Skip to content

fix(deps): upgrade vitest ^2→^4 to patch 5 moderate CVEs and remove duplicate script key#21

Open
leopechnicki wants to merge 1 commit intomainfrom
crew/fix/vitest-upgrade-and-pkg-cleanup
Open

fix(deps): upgrade vitest ^2→^4 to patch 5 moderate CVEs and remove duplicate script key#21
leopechnicki wants to merge 1 commit intomainfrom
crew/fix/vitest-upgrade-and-pkg-cleanup

Conversation

@leopechnicki
Copy link
Copy Markdown
Owner

Summary

  • Security: Upgrades vitest from ^2.0.0 to ^4.1.0, resolving 5 moderate CVEs in the esbuildvite@vitest/mocker chain (GHSA-67mh-4wv8-2f99). esbuild ≤0.24.2 allowed any cross-origin page to query the dev server and read responses.
  • Bug fix: Removes the duplicate "typecheck" key in package.json (lines 21 and 24 were identical), which caused vitest to warn on every test run.

Changes

  • package.json — removed duplicate typecheck script; bumped vitest from ^2.0.0 to ^4.1.0
  • package-lock.json — updated lockfile to reflect new dependency tree (0 vulnerabilities)

Test plan

  • npm install completes with 0 vulnerabilities (down from 5 moderate)
  • npm test — all 263 tests pass with vitest v4.1.5
  • npm run typecheck — no TypeScript errors
  • npm run lint — no lint warnings

Risk assessment

Low. The vitest v4.x API is backwards-compatible with v2.x for the patterns this project uses (plain describe/it/expect). All existing tests pass without modification.


Generated by Crew — Leo's Agile Dev Team


Generated by Claude Code

…uplicate typecheck script key

esbuild ≤0.24.2 (pulled in by vitest ^2.x → vite → @vitest/mocker) allows
any cross-origin page to query the dev server and read responses
(GHSA-67mh-4wv8-2f99). Upgrading vitest from ^2.0.0 to ^4.1.0 pulls in
esbuild ≥0.25 and resolves all 5 moderate advisories.

Also removes the duplicate "typecheck" key in the scripts object (lines 21
and 24 were identical), which caused vitest to warn on every test run.

All 263 tests continue to pass.
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.

2 participants