fix: upgrade Vitest 3→4 to resolve npm audit vulnerabilities#58
Merged
Conversation
Review Summary by QodoUpgrade Vitest 3→4 to resolve npm audit vulnerabilities
WalkthroughsDescription• Upgrades Vitest from v3.2.4 to v4.0.18 resolving npm audit vulnerabilities • Migrates vitest.config.ts to v4 API: poolOptions → maxWorkers and vmMemoryLimit • Updates documentation references to reflect new configuration option names • All 808 tests pass with zero npm audit vulnerabilities reported Diagramflowchart LR
A["Vitest v3.2.4<br/>with vulnerabilities"] -- "Upgrade packages" --> B["Vitest v4.0.18<br/>secure versions"]
B -- "Migrate config API" --> C["poolOptions removed<br/>maxWorkers + vmMemoryLimit"]
C -- "Update docs" --> D["CLAUDE.md<br/>references updated"]
D --> E["0 npm audit<br/>vulnerabilities"]
File Changes1. package.json
|
Code Review by Qodo
1. Stale Vitest config in docs
|
Replace 6 hand-rolled test:unit invocations with the single test:all script, which already chains all 10 test groups with correct paths and memory limits. Removes stale comments about Node 22.x and integration tests requiring Claude CLI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vitest,@vitest/coverage-v8, and@vitest/uifrom^3.2.4to^4.0.18npm auditvulnerabilities (minimatch ReDoS via@vitest/coverage-v8→test-exclude→glob→minimatch)vitest.config.tsfor v4 API changes:poolOptionsblock → top-levelmaxWorkers+vmMemoryLimitCloses #51
Config migration
poolOptions.threads.singleThread: truemaxWorkers: 1poolOptions.threads.maxThreads: 1maxWorkers: 1poolOptions.threads.minThreads: 1poolOptions.threads.memoryLimit: '1024MB'vmMemoryLimit: '1024MB'Test plan
npm run buildpassesnpm auditreports 0 vulnerabilitiesnpm run test:core— 275 passednpm run test:handlers— 80 passednpm run test:repositories— 109 passednpm run test:adapters— 40 passednpm run test:implementations— 218 passed, 3 skippednpm run test:cli— 86 passed