vitest
5.1.1 · 18 Nov 2026MIT194M / weekRepositoryHomepagenpmAtom feed
2.1.9 is the newest release of 2.x.
In short
26 fixed
Security
3 advisories affect 2.1.2; 4.1.11 fixes them
- CriticalWhen Vitest UI server is listening, arbitrary file can be read and executedGHSA-5xrq-8626-4rwp · 1 Jun 2026Fixed in 3.2.6
- CriticalVitest allows Remote Code Execution when accessing a malicious website while Vitest API server is listeningGHSA-9crc-q9x8-hgqq · 4 Feb 2025Fixed in 2.1.9
- ModerateVitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect MockGHSA-82fw-gwwq-j7x9 · 8 Sep 2026Fixed in 4.1.11
Release note
Bug Fixes
Move
Vitest.setServerto postconfigureServerhook to enable import analysis for workspace config loadingbenchmark: Clear
BenchmarkResult.samplesarray to reduce memory usagebrowser: Fix dynamic import inside worker
browser: Fix browser mock factory event race condition
browser: Serve ui assets as static
browser: Update solidjs testing library lib
browser: Use
data:protocol on preview provider file uploadbrowser: Fix base for client script
browser: Throw an error if "@vitest/browser/context" is imported outside of the browser mode
coverage: Remove empty coverage folder on test failure too
coverage: Include
*.astroby defaultcoverage:
cleanOnRerun: falseto invalidate previous resultsexpect: Fix
toBeDefinedwithexpect.pollforks: Fix
--cpu-profand--heap-profnot working by defaultrunner: Mark tests as skipped when
beforeAllfailedrunner: Support fixture parsing of lowered async syntax
runner: Fix fixture parsing of lowered async syntax for non arrow functions
runner: Guard test hook callback
runner: Run
onTestFinishedandonTestFailedduringretryandrepeatsui: List tests on ui when
--standalonevite-node: Fix esm false-detection inside comment
vitest: Install dependencies with the same version when prompted
vitest: Make env.SSR consistent between different pools
vitest: Don't start a websocket server if api is disabled
workspace: Fix glob pattern detection
workspace: Ignore DS_Store by default
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.