Releases: vitest-dev/vitest
Releases · vitest-dev/vitest
Release list
v5.0.0-rc.1
Immutable
release. Only release title and notes can be modified.
🚨 Breaking Changes
- Inline projects extend the root config by default - by @sheremet-va in #10750 (fec00)
- Enable mocking Temporal without fake timers - by @fabon-f, Hiroshi Ogawa and OpenCode in #10757 (ac2d4)
- Support nested projects - by @sheremet-va in #10846 (ec367)
- Use
>as separator in-t, calculateonlyonce - by @sheremet-va in #10686 (a0b20) - Fail the test when an asynchronous assertion is not awaited - by @sheremet-va in #10868 (86d4a)
- Share the Vite server between inline projects - by @sheremet-va in #10848 (d87c9)
- browser: Save failure screenshots in
attachmentsDir- by @macarie in #10917 (3b5bb) - spy: Preserve class mock prototype methods on instances - by @sheremet-va in #10910 (6093d)
- types: Add better promise support in expects and matchers - by @samchungy and @sheremet-va in #8266 (41f55)
🚀 Features
- Report the duration breakdown as percentages - by @sheremet-va and @AriPerkkio in #10820 (c67d2)
- cli: Support -p shorthand for --project - by @sheremet-va in #10826 (1addd)
- vm: Support
require(esm)in vm pools - by @sheremet-va in #10829 (01298)
🐞 Bug Fixes
- Coalesce concurrent watch-mode restarts, deflake the pool stderr fixture - by @sheremet-va in #10822 (a31f8)
- Prevent
vitest --typecheckfrom reporting a false success when thetscprocess crashes - by @hitenkalda and Hiten Kalda in #10705 (a1b05) - Collect in-source tests when the module is cached - by @koutaro-masaki in #10577 and #10589 (a7bf2)
- Swap replace() arguments so timeout error stack shows the real message - by @lazerg in #10875 (aba0f)
- Stale mock metadata breaks automocking with isolate:false - by @kade-robertson in #10145 and #10541 (8e210)
- Don't lose worker output on teardown, deflake timing-sensitive tests - by @sheremet-va in #10842 (1216b)
- browser:
- Ignore channel events in a tester opened as a top-level window - by @simshanith in #9379 and #9381 (46a3c)
- Resolve
connectTimeoutfrom the project config - by @lazerg in #10879 and #10880 (62c79) - Prebundle vite module runner with vitest - by @lebovvskii and @sheremet-va in #10836 and #10856 (37c24)
- Restore dependency reload warning - by @hi-ogawa, Hiroshi Ogawa and OpenCode in #10913 (90d69)
- Configure internal optimizer dependencies - by @hi-ogawa, Hiroshi Ogawa and OpenCode in #10915 (a72f4)
- cache:
- cli:
- Exit on
CTRL+ceven whenglobalSetupruns blocked code - by @AriPerkkio in #10863 (d568f)
- Exit on
- deps:
- Update all non-major dependencies - by @sheremet-va in #9958 (7faa7)
- Update all non-major dependencies - by @sheremet-va in #10861 (0188c)
- Update all non-major dependencies - by @sheremet-va in #10898 (61c4b)
- expect:
- reporters:
- Print parent describe suites when the passed-test list is hidden - by @ChihebBENCHEIKH1, Chiheb Bencheikh and @sheremet-va in #10606 and #10768 (658af)
- runner:
- Don't fail collection when accessing
error.stackthrows - by @sheremet-va in #10839 (202e2)
- Don't fail collection when accessing
- spy:
- Point ESM namespace spy error to module mocking docs - by @ryandiginomad and Ryan Tang in #10707 (d6cec)
- typecheck:
- Report a checker crash on Windows instead of a spawn failure - by @sheremet-va in #10907 (77aac)
- vitest:
- Remove broken "./src/*" export from package.json - by @sheremet-va in #10918 (2e5df)
- vm:
- Stop retaining every finished test file in vm pool workers - by @sheremet-va in #10854 (38503)
🏎 Performance
- Lowers peak memory usage when using
--changedon a large graph - by @jszumski in #10866 (9f23f) - browser: Serve framework assets as immutable - by @sheremet-va in #10729 (7af87)
View changes on GitHub
v5.0.0-beta.7
Immutable
release. Only release title and notes can be modified.
🚨 Breaking Changes
- Separate config resolution from the server creation - by @sheremet-va in #10554 (1c0ec)
🚀 Features
- Add toggable
injectCjsGlobalsoption - by @sheremet-va in #10709 (82671) - Promote fsModuleCache to a top-level option - by @sheremet-va in #10734 (78ed7)
- Support non-ascii characters in
for/eachtitle placeholders - by @k-yle in #10773 (15e0a) - benchmark: Add pluggable benchmark provider API - by @GuillaumeLagrange and @sheremet-va in #10799 (86c70)
🐞 Bug Fixes
- Disable server HMR before plugins read it in their config hook - by @sheremet-va in #10731 (e060b)
- Close the pool before the Vite servers - by @sheremet-va in #10725 (96fa6)
- Remove listeners in the typecheck worker's
off- by @sheremet-va in #10741 (d758b) - Keep per-file isolation in vm pools when maxWorkers is 1 - by @sheremet-va in #10743 (83ab9)
- Node.js 20 deprecation warning for
ci.yml- by @hirehamir in #10759 (2127f) - Prevent node builtins double prefix - by @malobre in #10630 and #10767 (22d35)
- Set non-zero exit code when teardown throws during close - by @zakcutner and @AriPerkkio in #10794 (22116)
- Don't race the typechecker spawn grace period on windows - by @xevrion in #10814 (b19e5)
- browser:
- Preserve pre-transform request defaults - by @sheremet-va in #10748 (b6060)
- Fix error stacktrace location off-by-one - by @hi-ogawa, Hiroshi Ogawa and OpenCode in #10724 (62b8d)
- Inlined awaited import should not trigger syntax error after transform - by @smeng9, Shaoyu Meng and Claude Opus 4.8 (1M context) in #10784 (51acd)
- Mock window.print to avoid hanging - by @aaravjaichand in #7375 and #10798 (66d95)
- pool:
🏎 Performance
- Serve warm modules to workers in one round-trip, enable the node compile cache - by @sheremet-va in #10708 (b144a)
- Make the Node compile cache opt-in, persist worker caches on teardown - by @sheremet-va in #10742 (941bc)
- Reuse compiled code across vm pool contexts and prewarm the module graph - by @sheremet-va in #10744 (d8b04)
- Bundle vitest's own dependencies - by @sheremet-va in #10685 (c0508)
- browser:
- Open browser sessions adaptively instead of maxWorkers upfront - by @sheremet-va in #10726 (6db8d)
- Cut per-file round trips - by @sheremet-va in #10730 (3feef)
- Stop serving framework sourcemaps in headless runs - by @sheremet-va in #10728 (6aefb)
- Prewarm the browser while the Vite server starts - by @sheremet-va in #10727 (c1767)
- Pre-bundle the vitest runtime in optimizeDeps - by @sheremet-va in #10713 (de631)
- coverage:
- Speed up v8 report generation (bounded-memory merge + precompiled globs) - by @toxik, Claude Opus 4.8 (1M context) and @AriPerkkio in #10506 (b05e5)
- Reduce RPC data and unnecessary serializations - by @AriPerkkio in #10781 (7e7e3)
View changes on GitHub
v5.0.0-beta.6
Immutable
release. Only release title and notes can be modified.
🚨 Breaking Changes
- Add
screenshotDirectoryconfig tobrowser.expect.toMatchScreenshot- by @macarie in #10592 (a60de) - Update
@sinonjs/fake-timersand support mockingTemporal- by @hi-ogawa, Hiroshi Ogawa and OpenCode (claude-opus-4-8) in #10654 (f8b15) - Remove webdriverio package - by @sheremet-va in #10675 (5fed6)
- Clear mocks by default before each test - by @sheremet-va in #10613 (0f646)
- Don't emit localStorage warnings on Node 26, fail gracefully when worker fails to start - by @sheremet-va in #10293 (334ed)
- reporters:
- Write json and junit reporter output files to
.vitestby default - by @hi-ogawa, Hiroshi Ogawa, OpenCode (claude-opus-4-8) and @AriPerkkio in #10621 (58577)
- Write json and junit reporter output files to
- ui:
🚀 Features
🐞 Bug Fixes
- Fix
setImmediateawait in detect-async-leak - by @hi-ogawa and Hiroshi Ogawa in #10608 (dd62b) - Fix per-project
sequenceconfig - by @hi-ogawa, Hiroshi Ogawa and OpenCode (claude-opus-4-8) in #10659 (40cdc) - Add handshake timeout to iframe communication - by @sheremet-va in #10656 (3545f)
- Don't print column in test names when
includeTaskLocationis enabled - by @sheremet-va in #10681 (bd9cc) - browser:
- Always derive a positive locator action timeout - by @sheremet-va in #10626 (5b864)
- Resize the browser ui only if it's not headless - by @sheremet-va in #10662 (b5c61)
- Check fs access in builtin commands - by @hi-ogawa, Hiroshi Ogawa and OpenCode (claude-opus-4-8) in #10674 (33f96)
- coverage:
- Non-awaited module imports cause wrong offsets - by @AriPerkkio in #10643 (c4090)
- Fail fast when
coverage.reportsDirectoryconflicts between concurrent runs - by @jgamaraalv and @AriPerkkio in #10466 (833f0)
- pool:
- Improve error message when worker exits unexpectedly - by @filmaj and @AriPerkkio in #10587 (76139)
- types:
- Allow
changedin configuration options - by @AriPerkkio in #10651 (0da12)
- Allow
- vm:
View changes on GitHub
v4.1.10
Immutable
release. Only release title and notes can be modified.
🐞 Bug Fixes
- browser: Check fs access in builtin commands [backport to v4] - by @hi-ogawa, Hiroshi Ogawa and OpenCode (claude-opus-4-8) in #10680 (5c18d)
- vm: Fix external module resolve error with deps optimizer query for encoded URI [backport to v4] - by @SveLil and @hi-ogawa in #10661 (bae52)
View changes on GitHub
v3.2.7
Immutable
release. Only release title and notes can be modified.
🐞 Bug Fixes
- browser: Check fs access in builtin commands [backport to v3] - by @hi-ogawa, Hiroshi Ogawa and OpenCode (claude-opus-4-8) in #10679 (b795e)
View changes on GitHub
v5.0.0-beta.5
Immutable
release. Only release title and notes can be modified.
🚨 Breaking Changes
- Don't lookup config file from ancestor directories - by @hi-ogawa, Codex and Hiroshi Ogawa in #10428 (945d9)
- Inline
@vitest/runnerpackage, do not publish it anymore - by @sheremet-va in #10511 (6d6e4) - Allow mutating happy-dom/jsdom window object - by @hi-ogawa, Hiroshi Ogawa and Codex in #10373 (206e8)
- Expose
concurrencyId/workerIdon TestModule's diagnostics, make id 1-based - by @sheremet-va in #10516 (bdd98) - browser: Require
sessionIdfor orchestrator html request - by @hi-ogawa, Hiroshi Ogawa and Codex in #10522 (79b7d) - coverage: Allow
thresholds.perFileto accept an object - by @vladlenskiy and @AriPerkkio in #10190 (13b78)
🚀 Features
- browser: Display nested mark trace in UI - by @hi-ogawa, Hiroshi Ogawa and Codex in #10437 (86ffc)
- cli: Add
--repeatsCLI option - by @todor-a in #10504 (ee48b) - coverage:
thresholds.autoUpdateto receive previous threshold as argument - by @wouterkroes in #10495 (04f81)
🐞 Bug Fixes
- Fix mixed stdout/stderr log timestamps in
onUserConsoleLog- by @Copilot, Hiroshi Ogawa, @hi-ogawa and @sheremet-va in #10308 (62756) - Fix
importOriginalwith optimizer and query import - by @davidhwilliams, David Harris, @hi-ogawa, Hiroshi Ogawa and Codex in #10469 (6a3bb) - Correct transform time calculation in merged report - by @potatomatoooo and @hi-ogawa in #10570 and #10578 (b7897)
- browser:
- Wait for orchestrator readiness before resolving browser sessions - by @soconnor-seeq in #10397 (fe5ed)
- Wait for iframe tester readiness before preparing - by @soconnor-seeq in #10497 (f2655)
- Encode iframeId in tester iframe URL - by @Pduhard, Pduhard and Claude Opus 4.8 (1M context) in #10520 and #10521 (c8bf1)
- coverage:
- Avoid matching sibling project roots - by @innoprej, Shin JaeHee and @AriPerkkio in #10311 (e30dd)
- mocker:
- Hoist vi.mock() for vite-plus/test imports - by @Brooooooklyn and Claude Opus 4.8 (1M context) in #10489 (88376)
- pool:
- Prevent test run hang on worker crash - by @jaxalo and @AriPerkkio in #10543 (40878)
- vitest:
- Strip non-serializable functions from inline diff config - by @DucMinhNe in #10573 (5b81a)
View changes on GitHub
v4.1.9
Immutable
release. Only release title and notes can be modified.
🐞 Bug Fixes
- Fix
importOriginalwith optimizer and query import [backport to v4] - by Hiroshi Ogawa, David Harris, Codexand Vladimir in #10546 (a5180) - browser:
- mocker:
- pool:
View changes on GitHub
v5.0.0-beta.4
Immutable
release. Only release title and notes can be modified.
🚨 Breaking Changes
- Throw an error if hoistable methods are outside the top level scope - by @sheremet-va in #10460 (d0b4f)
toHaveTextContentis strict, addtoMatchTextContentas alternative - by @sheremet-va in #10473 (18f30)- benchmark: Rewrite the public API - by @sheremet-va in #10113 (19f6e)
- browser: Enable
locators.exactby default - by @sheremet-va in #10430 (e2032)
🚀 Features
- browser: Show trace view steps in editor panel - by @hi-ogawa and Codex in #10404 (8c4b6)
- reporter: Support html reporter single file output - by @hi-ogawa, Codex and Claude Opus 4.7 (1M context) in #10235 (f757e)
🐞 Bug Fixes
- Preserve
vi.defineHelpercallsite for async error stack - by @macayu17 and @hi-ogawa in #10415 (ac697) - Respect
disableConsoleInterceptin browser mode - by @Copilot, hi-ogawa, @hi-ogawa and Codex in #10391 (66110) - ForceRerunTriggers uses directory globs against files - by @Patrick-Clausen and Patrick Clausen in #10421 and #10420 (4fee2)
- Unify typechecking and ast collection - by @sheremet-va in #10449 (af993)
- Don't print typecheck warning more than once - by @sheremet-va in #10461 (15275)
- Correct collumn when parsing tests - by @sheremet-va in #10467 (7c2fc)
- browser:
- mocker:
- ui:
- webdriverio:
- Allow gpu in headless chrome - by @rotempasharel1 in #10376 (f310a)
🏎 Performance
- Improve performance in hot paths - by @sheremet-va in #10446 (03faf)
View changes on GitHub
v4.1.8
Immutable
release. Only release title and notes can be modified.
v3.2.6
Immutable
release. Only release title and notes can be modified.