v5.0.0-beta.7
v5.0.0-beta.7
vitest
Release Notes
🚨 Breaking Changes
- Separate config resolution from the server creation - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10554 (1c0ec)
🚀 Features
- Add toggable
injectCjsGlobalsoption - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10709 (82671) - Promote fsModuleCache to a top-level option - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10734 (78ed7)
- Support non-ascii characters in
for/eachtitle placeholders - by @k-yle in https://github.com/vitest-dev/vitest/issues/10773 (15e0a) - benchmark: Add pluggable benchmark provider API - by @GuillaumeLagrange and @sheremet-va in https://github.com/vitest-dev/vitest/issues/10799 (86c70)
🐞 Bug Fixes
- Disable server HMR before plugins read it in their config hook - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10731 (e060b)
- Close the pool before the Vite servers - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10725 (96fa6)
- Remove listeners in the typecheck worker's
off- by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10741 (d758b) - Keep per-file isolation in vm pools when maxWorkers is 1 - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10743 (83ab9)
- Node.js 20 deprecation warning for
ci.yml- by @hirehamir in https://github.com/vitest-dev/vitest/issues/10759 (2127f) - Prevent node builtins double prefix - by @malobre in https://github.com/vitest-dev/vitest/issues/10630 and https://github.com/vitest-dev/vitest/issues/10767 (22d35)
- Set non-zero exit code when teardown throws during close - by @zakcutner and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/10794 (22116)
- Don't race the typechecker spawn grace period on windows - by @xevrion in https://github.com/vitest-dev/vitest/issues/10814 (b19e5)
- browser:
- Preserve pre-transform request defaults - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10748 (b6060)
- Fix error stacktrace location off-by-one - by @hi-ogawa, Hiroshi Ogawa and OpenCode in https://github.com/vitest-dev/vitest/issues/10724 (62b8d)
- Inlined awaited import should not trigger syntax error after transform - by @smeng9, Shaoyu Meng and Claude Opus 4.8 (1M context) in https://github.com/vitest-dev/vitest/issues/10784 (51acd)
- Mock window.print to avoid hanging - by @aaravjaichand in https://github.com/vitest-dev/vitest/issues/7375 and https://github.com/vitest-dev/vitest/issues/10798 (66d95)
- pool:
- Vm pools to respect cgroupsv2 memory limit - by @milas in https://github.com/vitest-dev/vitest/issues/10721 (3923c)
🏎 Performance
- Serve warm modules to workers in one round-trip, enable the node compile cache - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10708 (b144a)
- Make the Node compile cache opt-in, persist worker caches on teardown - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10742 (941bc)
- Reuse compiled code across vm pool contexts and prewarm the module graph - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10744 (d8b04)
- Bundle vitest's own dependencies - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10685 (c0508)
- browser:
- Open browser sessions adaptively instead of maxWorkers upfront - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10726 (6db8d)
- Cut per-file round trips - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10730 (3feef)
- Stop serving framework sourcemaps in headless runs - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10728 (6aefb)
- Prewarm the browser while the Vite server starts - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10727 (c1767)
- Pre-bundle the vitest runtime in optimizeDeps - by @sheremet-va in https://github.com/vitest-dev/vitest/issues/10713 (de631)
- coverage:
- Speed up v8 report generation (bounded-memory merge + precompiled globs) - by @toxik, Claude Opus 4.8 (1M context) and @AriPerkkio in https://github.com/vitest-dev/vitest/issues/10506 (b05e5)
- Reduce RPC data and unnecessary serializations - by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/10781 (7e7e3)