Skip to content

Commit 2667271

Browse files
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.
1 parent a0f8314 commit 2667271

File tree

9 files changed

+968
-1133
lines changed

9 files changed

+968
-1133
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,3 @@ jobs:
8080
name: playwright-report
8181
path: packages/tailwindcss/playwright-report/
8282
retention-days: 30
83-
84-
- name: Bench
85-
run: pnpm run bench

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,14 @@
3737
"devDependencies": {
3838
"@playwright/test": "^1.44.1",
3939
"@types/node": "^20.12.12",
40-
"@vitest/coverage-v8": "^1.6.0",
4140
"postcss": "8.4.24",
4241
"postcss-import": "^16.1.0",
4342
"prettier": "^3.2.5",
4443
"prettier-plugin-organize-imports": "^3.2.4",
4544
"tsup": "^8.0.2",
4645
"turbo": "^1.13.3",
4746
"typescript": "^5.4.5",
48-
"vitest": "^1.6.0"
47+
"vitest": "^2.0.5"
4948
},
5049
"packageManager": "pnpm@9.6.0"
5150
}

packages/@tailwindcss-postcss/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"tailwindcss": "workspace:^"
3737
},
3838
"devDependencies": {
39-
"@types/node": "^20.12.12",
39+
"@types/node": "catalog:",
4040
"@types/postcss-import": "^14.0.3",
4141
"postcss": "8.4.24",
4242
"internal-example-plugin": "workspace:*"

packages/@tailwindcss-vite/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"tailwindcss": "workspace:^"
3434
},
3535
"devDependencies": {
36-
"@types/node": "^20.12.12",
37-
"vite": "^5.2.11"
36+
"@types/node": "catalog:",
37+
"vite": "catalog:"
3838
},
3939
"peerDependencies": {
4040
"vite": "^5.2.0"

packages/tailwindcss/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
],
6565
"devDependencies": {
6666
"@tailwindcss/oxide": "workspace:^",
67-
"@types/node": "^20.12.12",
67+
"@types/node": "catalog:",
6868
"lightningcss": "^1.25.1"
6969
}
7070
}

playgrounds/nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"tailwindcss": "workspace:^"
1818
},
1919
"devDependencies": {
20-
"@types/node": "^20.12.12",
20+
"@types/node": "catalog:",
2121
"@types/react": "^18.3.3",
2222
"@types/react-dom": "^18.3.0",
2323
"eslint": "^8.57.0",

playgrounds/vite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@types/react": "^18.3.3",
2020
"@types/react-dom": "^18.3.0",
2121
"bun": "^1.1.10",
22-
"vite": "^5.2.11",
22+
"vite": "catalog:",
2323
"vite-plugin-handlebars": "^2.0.0"
2424
}
2525
}

0 commit comments

Comments
 (0)