vitest
5.1.1 · 18 Nov 2026MIT194M / weekRepositoryHomepagenpmAtom feed
Upgrading vitest From 4.0.12 to 5.1.1
27 releases in betweenevery note read
Before you upgrade
Tick each one off as you go- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
Security
Fixes 2 advisories affecting 4.0.12
- When Vitest UI server is listening, arbitrary file can be read and executedcritical · GHSA-5xrq-8626-4rwp
- Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mockmoderate · GHSA-82fw-gwwq-j7x9
Release by release
- New
Send source maps to workers as a string
- New
Resolve CLI file filters once instead of per test file
- Fixed
Rerun on file changes after a config restart
- Fixed
Avoid leaking the context expect
- New
- New
Add
--last-failedto run only failed tests - New
Support
Temporal.InstantandTemporal.ZonedDateTimeinvi.setSystemTime() - New
Introduce
--since-last-runflag - New
Expose per-retry/repeat attempt result
- New
- New
Add
datato theimport.meta.hotstub - Fixed
Keep vite default
fs.denywith api token file - Fixed
Handle quoted file names in
--changed - Fixed
Set
skipinskipIf, ignoreundefinedoptions
- New
- New
experimental: Tag cache directories with CACHEDIR.TAG
- New
experimental: Support
test.ui.themeoption - New
experimental: Highlight selector multiple matches in trace view
- New
experimental: Print how many tests were affected and a total when running
--changed
- New
- Fixed
Isolate
result.statusbetweenrepeatsruns - Fixed
Don't print an interceptor warning in browser mode
- Fixed
Don't retry when
test.failsexpectedly failed - Fixed
Scope cache key generators to projects
- Fixed
- Fixed
Bind
processin case global is overwritten - Fixed
detect-async-leaks: Ignore
process.stdiohandles - Fixed
expect: Fix
toMatchObjectwith asymmetric matchers - Fixed
jsdom: Fix
RequestwithBlobbody on jsdom 28+
- Fixed
- Deprecated
Warn when deprecated
deps.optimizer.webis used - New
ui: Move trace attempts selector to viewer header
- New
ui: Add focused trace view layout mode
- Fixed
Exit 1 when vitest list fails collection
- Deprecated
- Breaking
Replace
loupe.inspectwith pretty-format - Breaking
Remove quotes from string values in
test.for/eachtitle$variable (take 2) - Breaking
Default
attachmentsDirfrom.vitest-attachements/to.vitest/attachments/ - Breaking
Remove
sequentialtest/suite options in favor ofconcurrent
- Breaking
5 internal lines (docs, tests, tooling) left out.
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.