chore(deps-dev): bump vitest to 5 with regenerated bun.lock (fixes #982 CI)
TR
21d ago+32+32+01234567890123456789-36-36-01234567890123456789
Fixes the CI failure on #982 (Dependabot: vitest 4.1.11 -> 5.0.1). Supersedes #982 if merged; #982 itself can then be closed.
What changed
package.json: Dependabot's commit from #982 cherry-picked unchanged (vitest ^4.1.2 -> ^5.0.1).bun.lock: regenerated sobun install --frozen-lockfilepasses. #982 changed onlypackage.json, so every CI job died at Install dependencies (error: lockfile had changes, but lockfile is frozen). The lockfile diff (+31/-35) is limited to vitest and its transitive deps: vitest 5.0.2, @vitest/mocker + @vitest/spy 5.0.2, @vitest/expect/runner/snapshot/utils/pretty-format removed (inlined upstream), magic-string 1.x, tinybench 6, why-is-node-running 3, plus nested pins keeping existing consumers (vite, sucrase, @jridgewell) on their previous versions. Resolved against registry.npmjs.org (no private-registry URLs).- No config or test changes. Vitest 5 requires Vite >= 6.4 (lockfile has 8.0.3) and Node >= 22.12 (CI uses 22).
Vitest 5 migration checklist (https://vitest.dev/guide/migration)
clearMocksnow default true: onlyworker.debug-sentry.test.jsasserts call counts, and it already resets the mock inbeforeEach; behavior unchanged.- Hoisted
vi.mockmust be top-level: both uses (worker.http-semantics,worker.debug-sentry) are top-level. sequentialremoval,toThrow(""),expect.poll, fake timers, bench, deprecated entry points, projects/extends: not used..vitest/artifacts dir: already in.gitignore.vitest listis now static collection, so dynamicit.each/loop tests show as template names there; test-set comparison below uses real-run JSON reporter output instead.
Evidence (local, macOS arm64, bun 1.4.0, node 22.23)
bun install --frozen-lockfileon #982 head: fails (reproduced). On this branch: exit 0.bun run build: exit 0.vitest runbase (main 8b1951c, vitest 4.1.2) vs this branch (vitest 5.0.2), JSON reporter: 59 files / 712 tests / 712 passed on both; 0 test names only in one side, 0 status differences.- Fault injection: altering one
toThrowexpectation insrc/services/qr.test.jsmakes vitest 5 exit 1 (reverted), so failures are still detected. - Playwright E2E: local run 282 passed / 2 skipped (
PW_PORToverride, same head); CI E2E (Playwright) on this PR: both runs green.
Risk
Dev-dependency only; no runtime/Worker code changes. Main risk is a test-runner behavior change masking a regression; mitigated by identical test set and pass/fail status vs base and the fault-injection check.
Rollback
Revert this PR's merge commit (restores vitest 4 and the old lockfile).
Summary by cubic
Bumps vitest from ^4.1.2 to ^5.0.1 and regenerates bun.lock so bun install --frozen-lockfile passes in CI. Supersedes #982, which only changed package.json and caused every CI job to fail at the install step.
The lockfile diff is limited to vitest and its transitive deps; no config or test changes were needed.
Migration
- Ran the vitest 5 migration checklist; none of the breaking changes apply to this repo.
- Confirmed identical test results vs main (712/712 passing, no name or status differences); fault injection verified failures are still detected.