Skip to content

Upgrade vitest 3 to 5 to clear the tinypool and @vitest/mocker advisories - #15

Merged
antigenius0910 merged 1 commit into
mainfrom
chore/upgrade-vitest
Oct 25, 2026
Merged

antigenius0910 merged 1 commit into
mainfrom
chore/upgrade-vitest

Conversation

@antigenius0910

Copy link
Copy Markdown
Contributor

Why

npm audit reported 3 vulnerabilities, all in dev dependencies pulled in by vitest 3.2.7:

Package Severity Advisories
tinypool ≤2.1.1 critical Prototype pollution to RCE: GHSA-5gmw-xhrv-c9v3, GHSA-85c8-ppgw-ccpr
@vitest/mocker ≤4.1.11 moderate Path traversal / file read: GHSA-82fw-gwwq-j7x9; code injection via mock registration: GHSA-qxg6-89mg-rqv8

They are reachable while tests or CI run, not from the shipped game: npm audit --omit=dev was already clean.

Change

vitest ^3.0.0 → ^5.0.5 (lockfile regenerated). vitest 5 drops tinypool and ships @vitest/mocker 5.0.5. Its peer range (vite ^6.4 || ^7 || ^8) and engines (node ^22.12) fit our vite 6.4.4 and the Node 22 in .nvmrc. No test or config changes were needed.

vite, esbuild and rollup are unchanged in the lockfile, so the production bundle is unaffected.

Verification

  • npm audit: 0 vulnerabilities (was 1 moderate, 2 critical).
  • typecheck, lint, build pass; 267/267 tests pass with no warnings.
  • Planted a known bug (reverted the ramp clear-zone margin): vitest 5 fails the 2 clear-zone tests, so failures are still detected. Reverted.

🤖 Generated with Claude Code

…ries

npm audit flagged 3 dev-only vulnerabilities, all through vitest 3.2.7:
tinypool <=2.1.1 (critical, prototype pollution to RCE: GHSA-5gmw-xhrv-c9v3,
GHSA-85c8-ppgw-ccpr) and @vitest/mocker <=4.1.11 (moderate: GHSA-82fw-gwwq-j7x9,
GHSA-qxg6-89mg-rqv8). vitest 5.0.5 drops tinypool and ships a fixed mocker.
vite, esbuild and rollup are unchanged, so the production bundle is too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@antigenius0910
antigenius0910 merged commit f185ac3 into main Oct 25, 2026
2 checks passed
@antigenius0910
antigenius0910 deleted the chore/upgrade-vitest branch October 25, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant