Repository navigation
Commit ddea0fd
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
File tree
- .github/workflows
- packages
- cbjs
- deploy
- http-client
- telemetry-sentry
- vitest
- src
- extendedTests
- fixturesRaw/couchbase
- fixtures
- tests
- cbjs
- deploy
- http-client
- tests
- search
- waitFor
- scripts
- typescript-performance
- v8-optimization
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
0 commit comments