Upgrade vitest and remove bench script from CI (#14101)

This PR updates vitest to v2. The changes are mostly around using fork
instead of threads for how tests are run which should fix one of the
issues we've found.

Ever since adding the unit tests on Windows, we started seeing
occacional flags of vitest crashing with the following error:

```
 ELIFECYCLE  Command failed with exit code 3221225477.
Error: Process completed with exit code 1.
```

When reading the [v2
changelog](https://github.com/vitest-dev/vitest/releases/tag/v2.0.0) we
saw many bug fixes related to segfaulting so we believe this was the
issue.

When upgrading `vitest` alone, we got a bunch of dependency mismatches
though (specifically, vite was installed two times with different peer
dependencies for `@types/node` which causes our vite plugin's `Plugin`
type to be different from the one in the vite playground. Yikes. These
were eventually fixed by having pnpm create a new lockfile for us. So,
unfortunatly this PR also bumps a bunch of patch versions for some
transitive dependencies. Tests seem fine, though 🤞

This PR also removes the `bench` script from CI. It doesn't give us
value in its current state (since it's not reporting when performance
regresses) but added a few seconds of unnecessary overhead to each test
run.
This commit is contained in:
Philipp Spiess 2024-08-02 10:33:14 +02:00 committed by GitHub
parent a0f8314445
commit 266727138c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 970 additions and 1135 deletions

View File

@ -80,6 +80,3 @@ jobs:
name: playwright-report
path: packages/tailwindcss/playwright-report/
retention-days: 30
- name: Bench
run: pnpm run bench

View File

@ -37,7 +37,6 @@
"devDependencies": {
"@playwright/test": "^1.44.1",
"@types/node": "^20.12.12",
"@vitest/coverage-v8": "^1.6.0",
"postcss": "8.4.24",
"postcss-import": "^16.1.0",
"prettier": "^3.2.5",
@ -45,7 +44,7 @@
"tsup": "^8.0.2",
"turbo": "^1.13.3",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
"vitest": "^2.0.5"
},
"packageManager": "pnpm@9.6.0"
}

View File

@ -36,7 +36,7 @@
"tailwindcss": "workspace:^"
},
"devDependencies": {
"@types/node": "^20.12.12",
"@types/node": "catalog:",
"@types/postcss-import": "^14.0.3",
"postcss": "8.4.24",
"internal-example-plugin": "workspace:*"

View File

@ -33,8 +33,8 @@
"tailwindcss": "workspace:^"
},
"devDependencies": {
"@types/node": "^20.12.12",
"vite": "^5.2.11"
"@types/node": "catalog:",
"vite": "catalog:"
},
"peerDependencies": {
"vite": "^5.2.0"

View File

@ -64,7 +64,7 @@
],
"devDependencies": {
"@tailwindcss/oxide": "workspace:^",
"@types/node": "^20.12.12",
"@types/node": "catalog:",
"lightningcss": "^1.25.1"
}
}

View File

@ -17,7 +17,7 @@
"tailwindcss": "workspace:^"
},
"devDependencies": {
"@types/node": "^20.12.12",
"@types/node": "catalog:",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"eslint": "^8.57.0",

View File

@ -19,7 +19,7 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"bun": "^1.1.10",
"vite": "^5.2.11",
"vite": "catalog:",
"vite-plugin-handlebars": "^2.0.0"
}
}

2083
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -3,3 +3,7 @@ packages:
- 'crates/node/npm/*'
- 'packages/*'
- 'playgrounds/*'
catalog:
vite: ^5.2.11
'@types/node': ^20.12.12