vitest
5.1.1 · 18 Nov 2026MIT194M / weekRepositoryHomepagenpmAtom feed
2.1.9 is the newest release of 2.x.
In short
1 new1 faster16 fixed2 internal
Security
3 advisories affect 2.1.4; 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
Features
This patch release includes a non-breaking feature for the experimental Browser Mode that doesn't follow SemVer. If you want to avoid picking up releases like this, make sure to pin the Vitest version in your package.json. See npm's documentation about semver for more information.
browser: Allow custom HTML path, respect plugins
transformIndexHtml
Bug Fixes
windows: Don't normalize drive case letter in root
browser: Fix default browser port
browser: Optimize expect-type
browser: Don't polyfill process.env
browser: Increment browser port automatically if there are several projects with browser.enabled
browser: Cleanup keyboard state
browser: Don't add
v=queries to setup files importsbrowser: User event cleanup on retry
browser: Ignore non mocked msw requests
browser: Initiate MSW in the same frame as tests
expect: Correct behavior of
toThrowErrorwith empty string parametermocker: Remove spy from peer dependencies
vitest: Print warnings form Vite plugins
vitest: Don't fail if the working directory starts with a lowercase drive letter
vitest: Silence import analysis warning
vitest,runner: Simplify
test.extendtype exports
Performance
Use
hashto replacecreateHash
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.