Skip to content

Commit ddea0fd

Browse files
committed
chore(deps): upgrade to vite 8 and vitest 4
vitest 4 requires Node >= 20 and vite 8 requires ^20.19 || >=22.12, so the toolchain moves to Node 22 LTS (.nvmrc, release.yml). The engines of the published packages are left untouched: consumers on Node 18 keep working, and the peer range of @cbjsdev/vitest already accepted vitest 4. esbuild is now a root devDependency because vite 8 declares it as a peer, and @types/node is bumped where it fell below the range vite 8 asks for. @cbjsdev/vitest gets explicit vitest / @vitest/runner devDependencies, as the auto-installed peers resolved to vitest 3 there. The breaking changes of vitest 4: - `test.workspace` is now `test.projects`, and `minWorkers` is gone. - `TaskContext` is gone; the fixtures of @cbjsdev/vitest take a `TestContext`, which carries the same `task` plus the rest of the test context. - Suite hooks receive the suite as their second argument, the first one now being the fixture context - which has to be a destructuring pattern, even when unused, hence the `no-empty-pattern` exemptions in the setup files. - `test(name, fn, options)` was removed in favour of `test(name, options, fn)`. - `extend` gained a scoped fixtures ($test/$file/$worker) overload that any record structurally satisfies, so an explicit type argument now resolves to it and erases the fixture types. The declared return type of `makeCreateTest` stays the source of truth. `--typecheck` deserves a special mention: vitest 4 only forwards an allowlist of CLI options to the project configs, and `typecheck` is not part of it. Type tests silently collected nothing while the run reported green, so the shared package config reads the flag off `process.argv` itself. Docs stay on vite 5, the version VitePress 1.x depends on.
1 parent 38c13c7 commit ddea0fd

32 files changed

Lines changed: 2956 additions & 7026 deletions

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- uses: actions/setup-node@v6
2121
with:
22-
node-version: 18.x
22+
node-version: 22.x
2323

2424
- run: |
2525
export PREVIOUS_TAG=$(git tag --sort=-creatordate --merged origin/main | sed -n '2p')

‎.nvmrc‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.20.4
1+
22.21.1

‎package.json‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"@trivago/prettier-plugin-sort-imports": "4.3.0",
2020
"@typescript-eslint/eslint-plugin": "6.21.0",
2121
"@typescript-eslint/parser": "6.21.0",
22-
"@vitest/coverage-v8": "3.0.5",
23-
"@vitest/runner": "3.0.5",
24-
"@vitest/ui": "3.0.5",
22+
"@vitest/coverage-v8": "4.1.10",
23+
"@vitest/runner": "4.1.10",
24+
"@vitest/ui": "4.1.10",
2525
"eslint": "^8.44.0",
2626
"eslint-config-prettier": "9.1.0",
2727
"eslint-plugin-jsdoc": "48.0.5",
@@ -36,7 +36,8 @@
3636
"prettier": "3.2.5",
3737
"tsup": "^8.0.1",
3838
"typescript": "5.4.5",
39-
"vite": "^6.0.11",
40-
"vitest": "3.0.5"
39+
"vite": "^8.2.0",
40+
"vitest": "4.1.10",
41+
"esbuild": "^0.28.1"
4142
}
4243
}

‎packages/cbjs/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"devDependencies": {
6666
"@types/node": "^22.14.1",
6767
"typescript": "5.4.5",
68-
"vitest": "3.0.5"
68+
"vitest": "4.1.10"
6969
},
7070
"config": {
7171
"native": false

‎packages/deploy/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
"devDependencies": {
4444
"typescript": "5.4.5",
45-
"vitest": "3.0.5"
45+
"vitest": "4.1.10"
4646
},
4747
"publishConfig": {
4848
"access": "public",

‎packages/http-client/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"@types/json-bigint": "^1.0.4",
4545
"@types/semver": "^7.5.8",
4646
"typescript": "5.4.5",
47-
"vitest": "3.0.5",
47+
"vitest": "4.1.10",
4848
"zod": "^3.22.4"
4949
},
5050
"publishConfig": {

‎packages/shared/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"devDependencies": {
3434
"@ark/attest": "^0.25.0",
3535
"typescript": "5.4.5",
36-
"vitest": "3.0.5"
36+
"vitest": "4.1.10"
3737
},
3838
"publishConfig": {
3939
"access": "public",

‎packages/telemetry-sentry/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"devDependencies": {
5353
"couchbase": "^4.7.0",
5454
"typescript": "5.4.5",
55-
"vitest": "3.0.5"
55+
"vitest": "4.1.10"
5656
},
5757
"publishConfig": {
5858
"access": "public",

‎packages/vitest/package.json‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,12 @@
6363
"ts-retry-promise": "^0.8.0"
6464
},
6565
"devDependencies": {
66-
"@types/node": "^20.12.7",
66+
"@types/node": "^22.14.1",
6767
"typescript": "5.4.5",
6868
"unbuild": "^2.0.0",
69-
"zod": "^3.22.4"
69+
"zod": "^3.22.4",
70+
"vitest": "4.1.10",
71+
"@vitest/runner": "4.1.10"
7072
},
7173
"peerDependencies": {
7274
"@vitest/runner": "^1.5.2 || ^2.0.0 || ^3.0.0 || ^4.0.0",

‎packages/vitest/src/extendedTests/createCouchbaseTest.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616
import '@vitest/runner';
17-
import type { TaskContext } from 'vitest';
17+
import type { TestContext } from 'vitest';
1818

1919
import type { CouchbaseApiConfig } from '@cbjsdev/shared';
2020
import { type PromiseValue } from '@cbjsdev/shared';
@@ -72,7 +72,7 @@ export type CouchbaseTestContext = {
7272
export type CouchbaseFixtures = TestBodyFixtures<
7373
typeof couchbaseTestFixtures & CouchbaseTestContext
7474
> &
75-
TaskContext;
75+
TestContext;
7676

7777
export type FixtureWithCouchbase<T> = (
7878
fixtures: CouchbaseFixtures,

0 commit comments

Comments
 (0)