🚨 [security] [js] Update vitest 4.1.11 → 5.0.1 (major)
🚨 Your current dependencies have known security vulnerabilities 🚨
This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!
Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.
What changed?
✳️ vitest (4.1.11 → 5.0.1) · Repo
Security Advisories 🚨
🚨 Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock
Summary
@vitest/mockerregisters a redirect mock's target path without validating it
against the dev server's file-serving allowlist. An attacker who can reach the
dev server's WebSocket can register a redirect mock pointing outside the project
root; when the mocked module is requested, the plugin'sloadhook returns
readFile(<attacker path>)as the module source, disclosing local files.This is exploitable without authentication only through the public
mockerPlugin/ standaloneinterceptorPluginexports (used by third-party dev
servers), which register the handler on Vite's unauthenticated HMR socket.
Vitest's own browser mode registers mocks over a token-authenticated RPC and
is not remotely reachable by default (see Scope).Affected code
packages/mocker/src/node/interceptorPlugin.ts.The
loadhook is the file-read sink:if (mock.type === 'redirect') { return readFile(mock.redirect, 'utf-8') }
mock.redirectis derived from client input at registration time with no
boundary check:if (event.type === 'redirect') { const redirectUrl = new URL(event.redirect) event.redirect = join(server.config.root, redirectUrl.pathname) } registry.register(event)There is no
server.fs.allow/server.fs.denycheck and no assertion that the
resolved path stays within the project root.Registration paths and trust boundaries
- Public
mockerPlugin/interceptorPlugin(unauthenticated). In
configureServer, the plugin registersserver.ws.on('vitest:interceptor:register', …)
on Vite's HMR WebSocket. That socket performs no token, Origin, or same-origin
check, so any client that can reach it can register a redirect mock. This is
the path the "unauthenticated" impact applies to.- Vitest browser mode (authenticated). Mocks register over the browser RPC
(registerMock), which sits behind a per-run token (isValidApiRequest, a
randomapi.token). The interceptor'sconfigureServersocket is not used for
registration here (in v5 it does not run at all, as the plugin is injected per
environment). The same missing boundary check exists on the authenticated RPC
path, but reaching it requires the token, so it is not a remote-unauthenticated
read.Path handling
new URL(redirect).pathnamecombined withjoin(root, pathname)does not
confine reads to the root:
- Special/hierarchical schemes (
file:,http:) are normalized by WHATWG URL,
so..segments are collapsed and the result stays under the root. Payloads of
the formfile:///../../etc/passwddo not escape.- A non-special (opaque) scheme preserves
..inpathname, so
join(root, "../../…/etc/passwd")resolves outside the root and reads an
arbitrary file.Even without escaping the root, the missing
server.fscheck allows reading any
in-root file the dev server would otherwise refuse to serve (for example an
in-root.envor source that is denied byserver.fs.deny).Scope / preconditions
- This is a development-server issue. The dev server binds to
localhostby
default and is not reachable from the network unless the developer exposes it
(server.host/0.0.0.0, a LAN bind, or a proxy).- A raw (non-browser) client against a reachable server bypasses browser origin
and CORS protections entirely and can both register the mock and read the
response.- A browser-based drive-by against a localhost server is substantially mitigated
by Vite defaults: the default CORS origin allowlist is limited tolocalhost
origins, andserver.allowedHostsblocks DNS-rebinding, so a cross-origin page
cannot read the file contents back.Impact
Disclosure of local files readable by the dev-server process (source, in-root
.env/secrets, and, via the opaque-scheme payload, files outside the project
root). No integrity or availability impact.Affected versions
Present since
@vitest/mockerwas introduced.
- Affected:
@vitest/mocker>= 2.1.0 (shipped invitestand
@vitest/browser>= 2.1.0), through 4.1.x and the 5.0.0 pre-releases.- Fixed: Vitest 4.1.11 and 5.0.0. Older majors (2.1.x, 3.x) are not
maintained and are not planned to receive the fix.Fix
Validate the resolved redirect target against Vite's file-serving allowlist
(isFileLoadingAllowed) before registering it, at every registration site, and
stop registering the interceptor WebSocket events in Vitest's browser mode
(mocks there flow through the authenticated RPC).
Release Notes
5.0.1
🚀 Features
- ui:
🐞 Bug Fixes
- Exit 1 when vitest list fails collection - by @hamed-bavar in #11145 and #11146 (6108b)
- Keep parse error details in static collection - by @hamed-bavar in #11150 and #11151 (7c818)
- Avoid recursive prototype in automocking - by @sheremet-va in #11195 (99fc5)
- Prevent false Vitest import resolution - by @sheremet-va in #11196 (b426c)
- Keep metadata file when clearing the cache - by @sheremet-va in #11199 (73614)
- Correct typos in error message and comments - by @shinji00222 and Shinji in #11187 (115c3)
- Resolve ResolvedConfig exactOptionalPropertyTypes errors - by @LukeAbby in #11175 (498fb)
- Share the server on self-referencing
extends- by @sheremet-va in #11034 (23dda)- Warn when deprecated
deps.optimizer.webis used - by @im10furry in #11214 (2ce29)- browser:
- Avoid double quotes in
config.define- by @sheremet-va in #11198 (972e2)- doctor:
- Measure vm pools for custom environments - by @sheremet-va in #11212 (91ab1)
- expect:
- Correct return value in
toMatchAriaSnapshot- by @sheremet-va in #11208 (c119b)- fakeTimers:
- Force
queueMicrotaskandnextTickintoNotFake- by @kingmakeruix, kingmakeruix, Hiroshi Ogawa, Codex and @hi-ogawa in #11261 (a47d7)- snapshot:
- Report obsolete keys next to skipped tests - by @hamed-bavar, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11157 and #11158 (17e2b)
- types:
- Make public declarations self-contained - by @ZoeySigel in #11141 (45546)
- ui:
- utils:
View changes on GitHub
5.0.0
Vitest 5 is officially out! This release focuses on performance and brings a lot of new features while fixing long-standing bugs. See our blog post for the official announcement.
🚨 Breaking Changes
- Replace
loupe.inspectwith pretty-format - by @hi-ogawa, Claude Opus 5 (1M context) and OpenAI Codex in #9609 (3f802)- Remove quotes from string values in
test.for/eachtitle$variable (take 2) - by @hi-ogawa in #10170 (04d37)- Default
attachmentsDirfrom.vitest-attachements/to.vitest/attachments/- by @MdSadiqMd in #10186 (1ba73)- Remove
sequentialtest/suite options in favor ofconcurrent- by @hi-ogawa and OpenAI Codex in #10198 (9229f)- Represent locator as an object instead of a string - by @sheremet-va in #10212 (80f07)
- Inline
expectpackage - by @sheremet-va in #10221 (ad162)- Remove deprecated entry points - by @sheremet-va in #10222 (994c6)
- Require Node.js 22 and Vite 6.4 - by @sheremet-va in #10178 (38762)
- Fail
expect.pollwhen function didn't resolve in time - by @hi-ogawa and OpenAI Codex in #10233 (4df04)- 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)- Don't lookup config file from ancestor directories - by @hi-ogawa, OpenAI 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 OpenAI Codex in #10373 (206e8)
- Expose
concurrencyId/workerIdon TestModule's diagnostics, make id 1-based - by @sheremet-va in #10516 (bdd98)- Add
screenshotDirectoryconfig tobrowser.expect.toMatchScreenshot- by @macarie in #10592 (a60de)- Update
@sinonjs/fake-timersand support mockingTemporal- by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) 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)
- Separate config resolution from the server creation - by @sheremet-va in #10554 (1c0ec)
- 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 (gpt-5.6-sol) 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)
- Parse files statically in vitest list by default - by @sheremet-va in #11088 (51e94)
- benchmark:
- Rewrite the public API - by @sheremet-va in #10113 (19f6e)
- browser:
- Iframe scale - by @macarie in #9745 (b6398)
- Enable
locators.exactby default - by @sheremet-va in #10430 (e2032)- Require
sessionIdfor orchestrator html request - by @hi-ogawa, Hiroshi Ogawa and OpenAI Codex in #10522 (79b7d)- Save failure screenshots in
attachmentsDir- by @macarie in #10917 (3b5bb)- coverage:
include/excludeglobs too eager - by @AriPerkkio in #9818 (edacb)- Allow
thresholds.perFileto accept an object - by @vladlenskiy and @AriPerkkio in #10190 (13b78)- expect:
- mocker:
- reporters:
blobreporter and--merge-reportsdefault to.vitest/blob/- by @AriPerkkio in #10232 (d22b0)- Write json and junit reporter output files to
.vitestby default - by @hi-ogawa, Hiroshi Ogawa, OpenCode (gpt-5.6-sol) and @AriPerkkio in #10621 (58577)- 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)
- ui:
🚀 Features
- Add
createReportand.vitestreport directory convention - by @AriPerkkio in #9993 (72a6d)- Expose default reporters through
configDefaults.reporters- by @hi-ogawa and Claude Opus 5 (1M context) in #10219 (083f6)- Support merge reports for non-sharded multi-environment runs (take 2) - by @hi-ogawa, Claude Opus 5 (1M context), OpenAI Codex and @AriPerkkio in #10031 (e60b2)
- Add
logger.formatError- by @hi-ogawa and OpenAI Codex in #10268 (2c5f3)- Support typescript build mode - by @lishaduck in #9870 (106da)
- 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)- Report the duration breakdown as percentages - by @sheremet-va and @AriPerkkio in #10820 (c67d2)
- Promote parseSpecifications out of experimental - by @sheremet-va in #11087 (b628c)
- Promote clearCache out of experimental - by @sheremet-va in #11086 (d4fe1)
- api:
- Expose logs recorded during the test - by @sheremet-va in #10277 (cba20)
- benchmark:
- Add pluggable benchmark provider API - by @GuillaumeLagrange and @sheremet-va in #10799 (86c70)
- browser:
- Export aria tree utils - by @hi-ogawa in #10171 (c3423)
- Support dom snapshot trace view - by @hi-ogawa, Claude Opus 5 (1M context) and OpenAI Codex in #10102 (7eddd)
- Provide project reference in
ToMatchScreenshotResolvePath- by @macarie and @sheremet-va in #10138 (16654)- Show aria tree on locator element error - by @hi-ogawa and OpenAI Codex in #10257 (04f04)
- Support custom
kindinpage.mark- by @AriPerkkio in #10302 (053e8)- Live update trace view on watch UI - by @hi-ogawa and OpenAI Codex in #10296 (78c11)
- Add
context.markfor custom command tracing - by @AriPerkkio in #10329 (aa514)- Show trace view steps in editor panel - by @hi-ogawa and OpenAI Codex in #10404 (8c4b6)
- Display nested mark trace in UI - by @hi-ogawa, Hiroshi Ogawa and OpenAI Codex in #10437 (86ffc)
- cli:
- coverage:
- V8 to track
node:child_processandnode:worker_threadscontexts - by @AriPerkkio in #9976 (9baa5)thresholds.autoUpdateto receive previous threshold as argument - by @wouterkroes in #10495 (04f81)- Switch to
@vitest/istanbuljspackages - by @AriPerkkio in #11053 (5f6a5)- junit-reporter:
- Add jest-junit-compatible naming options - by @neumaennl, neumaennl, Martin Neumann and Copilot in #10189 (27393)
- reporter:
- ui:
- Highlight editor source locations - by @sheremet-va, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11004 (bce2d)
- Navigate trace steps with keyboard and remove indirect editor focus - by @sheremet-va, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11005 (6816f)
- Persist trace view selection in URL - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10981 (3069e)
- Toggle trace target highlight - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11049 (cd63e)
- Add link to open playwright trace - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11059 (58f02)
- vitest:
- vm:
- Support
require(esm)in vm pools - by @sheremet-va in #10829 (01298)🐞 Bug Fixes
- Global
sequence.concurrent: truewith top-leveltest(..., { concurrent: false })+ depreactesequentialtest API and options - by @hi-ogawa, OpenAI Codex and @sheremet-va in #10194 (9387f)- Test
tagsoptions should overwrite inherited suite options + inherit suite options intaskAPI - by @hi-ogawa and OpenAI Codex in #10216 (457db)- Udpate optimize deps config - by @sheremet-va in #10223 (95dc6)
- Shell injection safety via github.ref_name in publish workflow - by @lloyd-c137 and lloyd-c137 in #10327 (dd020)
- Make
attachmentsDirroot only config - by @hi-ogawa and OpenAI Codex in #10334 (fab1b)- Apply cjs interop for truthy
__esModule- by @hi-ogawa in #10363 (2b135)- Preserve
vi.defineHelpercallsite for async error stack - by @macayu17 and @hi-ogawa in #10415 (ac697)- Respect
disableConsoleInterceptin browser mode - by @Copilot, Hiroshi Ogawa, @hi-ogawa and OpenAI 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)
- 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 @davidxharris, David Harris, @hi-ogawa, Hiroshi Ogawa and OpenAI Codex in #10469 (6a3bb)- Correct transform time calculation in merged report - by @potatomatoooo and @hi-ogawa in #10570 and #10578 (b7897)
- 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 (gpt-5.6-sol) 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)- 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)
- 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)
- Revive global concurrency limit for test lifecycle - by @hi-ogawa, Hiroshi Ogawa, OpenCode (gpt-5.6-sol) and @sheremet-va in #10928 (cf917)
- Own the post-restart rerun, keep
process.exitdisabled in workers - by @sheremet-va in #10963 (5e69a)- Preserve correct root during resolve config - by @AriPerkkio and @sheremet-va in #10909 (210ba)
- Combine multiple --project filters correctly - by @sheremet-va in #10988 (66c1c)
- Fix
recordArtifactlocation withvi.defineHelper- by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11047 (c2186)- Invalidate resolved setup files - by @sheremet-va in #11073 and #11081 (488c0)
- Accept awaited value in vi.when thenResolve - by @sheremet-va in #11084 (c10a1)
- Ignore computed member calls in static collection - by @sheremet-va in #11085 (130f7)
- Don't duplicte
oxc.targetif user provides a custom array - by @sheremet-va in #11095 (848d7)- Propagate --maxWorkers to projects - by @Gaurav1112 in #11102 (2122f)
- Apply queued mocks from doMock() in queue order - by @juliandescottes and Claude Opus 5 (1M context) in #10706 and #11127 (f08ce)
- Add a warning if inline project has duplicate plugins due to unexpected
extends: true- by @sheremet-va in #11120 (584cf)- Treat test.describe as a suite during static collection - by @sheremet-va in #11128 (d46a7)
- browser:
- Fix trace highlight of shadow dom on webdriverio - by @hi-ogawa in #10227 (b01af)
- Simplify orchestrator otel carrier - by @hi-ogawa in #10283 (3514f)
- Remove orphaned Playwright route when same module is mocked via multiple ids - by @Zelys-DFKH in #9957 and #10267 (41db6)
- Skip
wrapDynamicImporttransform on ssr environment - by @hi-ogawa in #10355 (d3c96)- Fix stale source map on watch mode - by @hi-ogawa in #10389 (6d772)
- Escape inline orchestrator scripts - by @hi-ogawa and OpenAI Codex in #10412 (c22cf)
- Disable client
cdpAPI whenallowWrite/allowExec: false- by @hi-ogawa and OpenAI Codex in #10444 (63e3b)- 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 5 (1M context) in #10520 and #10521 (c8bf1)
- 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 (gpt-5.6-sol) in #10674 (33f96)
- 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 (gpt-5.6-sol) in #10724 (62b8d)
- Inlined awaited import should not trigger syntax error after transform - by @smeng9, Shaoyu Meng and Claude Opus 5 (1M context) in #10784 (51acd)
- Mock window.print to avoid hanging - by @aaravjaichand in #7375 and #10798 (66d95)
- 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 (gpt-5.6-sol) in #10913 (90d69)
- Configure internal optimizer dependencies - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10915 (a72f4)
- Trigger playwright/chromium gc on lower disk availability - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10912 (032d3)
- Disallow filter-only options in getBy* locators - by Arjun in #10295 and #10933 (9b4df)
- Fail instead of hanging when the browser stops responding - by @sheremet-va in #10956 (c496c)
- Exit gracefully when the browser disconnects during cancellation - by @sheremet-va in #10962 (67e84)
- Don't redirect vitest in client environment - by @sheremet-va in #10975 (aeb67)
- Don't hang when
ui: truein projects - by @AriPerkkio in #10994 (9f710)- Preserve trace popover state - by @liuluochen6-af, Hiroshi Ogawa, OpenCode (gpt-5.6-sol) and @hi-ogawa in #10906 and #11021 (1bbc2)
- Report the action error when a task times out - by @sheremet-va in #11101 (dc10f)
- cache:
- cli:
- coverage:
excludeto not inherit negation globs fromtest.include- by @AriPerkkio in #10299 (28685)- Avoid matching sibling project roots - by @innoprej, Shin JaeHee and @AriPerkkio in #10311 (e30dd)
- 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)- V8 to ignore Vite SSR's generated import bindings - by @AriPerkkio in #11023 (c6174)
- Prevent crash on
/@fs/prepended virtual files - by @AriPerkkio in #11119 (c4473)- deps:
- Update ivya to fix empty aria tree snapshot - by @hi-ogawa in #10218 (f7822)
- Update fake-timers to 15.3.2. support
toNotFake- by @BPScott, @hi-ogawa and OpenAI Codex in #10043 (bbf2f)- 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)
- Update all non-major dependencies - in #10966 (65263)
- Update all non-major dependencies - in #11043 (732df)
- expect:
- junit:
- mocker:
- Skip hoist transform without ast mock calls - by @hi-ogawa and OpenAI Codex in #10410 (0468e)
- Hoist vi.mock() for vite-plus/test imports - by @Brooooooklyn and Claude Opus 5 (1M context) in #10489 (88376)
- Restrict redirect mocks to the fs allowlist - by @sheremet-va in #10972 (8ff9b)
- pool:
- Prevent test run hang on worker crash - by @jaxalo and @AriPerkkio in #10543 (40878)
- Improve error message when worker exits unexpectedly - by @filmaj and @AriPerkkio in #10587 (76139)
- Vm pools to respect cgroupsv2 memory limit - by @milas in #10721 (3923c)
- Worker init to handle queued synchronous messages - by @lazerg and @AriPerkkio in #10932 (76096)
- Report the worker exit instead of a pipe error that raced it - by @sheremet-va in #10964 (59a03)
- reporter:
- reporters:
- Fix blob file name with label - by @hi-ogawa in #10346 (c5e2e)
summaryto intercept logger's streams even when they are notprocess.std*streams - by @AriPerkkio in #10340 (f79e7)- Fix missing
testModulesinonTestRunEndwhen merging blobs from different root directory test runs - by @hi-ogawa and OpenAI Codex in #10348 (745b3)- Print parent describe suites when the passed-test list is hidden - by @ChihebBENCHEIKH1, Chiheb Bencheikh and @sheremet-va in #10606 and #10768 (658af)
- Display
test.namein GitHub Actions reporter summary header - by @macarie in #10887 (49e24)- runner:
- Propagate chainable flags in describe.for - by @DoriAlagem, Dor Alagem and @hi-ogawa in #10187 (db678)
- Limit concurrency per task branch in addition to per leaf callbacks - by @hi-ogawa in #10179 (3112a)
- Remove AbortSignal listener leak in withCancel - by @tomohiro86 and @AriPerkkio in #10265 (ab098)
- Don't fail collection when accessing
error.stackthrows - by @sheremet-va in #10839 (202e2)- snapshot:
- Fail test when snapshot assertion is used with
test.fails- by @hi-ogawa in #10090 (e1aa7)- Treat empty string as valid snapshot - by @mayrang and @hi-ogawa in #10188 (e145d)
- Support no-unsafe-eval CSP by evaluating snapshot files on server - by @hi-ogawa in #10665 (667c1)
- Reject when
toMatchFileSnapshotuses same snapshot file astoMatchSnapshot- by @hi-ogawa, Hiroshi Ogawa, OpenCode (gpt-5.6-sol) and @sheremet-va in #10978 (17646)- spy:
- typecheck:
- Report a checker crash on Windows instead of a spawn failure - by @sheremet-va in #10907 (77aac)
- types:
- Allow
changedin configuration options - by @AriPerkkio in #10651 (0da12)- ui:
- Fix duplicate colored error message - by @hi-ogawa and OpenAI Codex in #10258 (035e3)
- Fix missing source code in html reporter metadata when merging blobs with different root directory test runs - by @hi-ogawa and OpenAI Codex in #10338 (4f7c2)
- Fix module graph in browser mode with --ui - by @hi-ogawa in #10386 (3003c)
- Render ANSI color codes in editor panel inline error widget - by @Copilot, Hiroshi Ogawa and @hi-ogawa in #10418 (766b8)
- Fix code editor error and annotations gadgets layout shifts - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10969 (438ed)
- Synchronize watch-run UI state on file removal - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10941 (30c21)
- Require auth for coverage report and all UI subtree requests - by @sheremet-va in #10971 (5622f)
- Improve suite interaction and layout in explorer tree - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10970 (91231)
- Reveal explorer virtual scroller on resize - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10998 (1f4fc)
- Persist trace step-iframe split pane sizes - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11027 (3cd01)
- Add suite level report view - by @dvmhmdsd, Hiroshi Ogawa, OpenCode (gpt-5.6-sol) and @hi-ogawa in #11038 (602d2)
- Hide running count in static reports - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11123 (73d72)
- utils:
- vitest:
- vm:
- Fix external module resolve error with deps optimizer query for encoded URI - by @SveLil in #10658 (90c4e)
- Stop retaining every finished test file in vm pool workers - by @sheremet-va in #10854 (38503)
- Fall back to compiling from source when a module's code cache is rejected - by @MarshallOfSound in #11031 (c3ba1)
- Link module graphs one at a time - by @sheremet-va in #11096 (3f2dd)
- webdriverio:
- worker:
- Bind stdio's early in case overriden - by @AriPerkkio in #11020 (67ef7)
🏎 Performance
- Stringify diff objects only once - by @sheremet-va in #10276 (d006a)
- Improve performance in hot paths - by @sheremet-va in #10446 (03faf)
- 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)
- Lowers peak memory usage when using
--changedon a large graph - by @jszumski in #10866 (9f23f)- Initialize trace view in the orchestrator once per worker - by @sheremet-va in #10984 (fad26)
- browser:
- Reduce matching screenshot overhead - by @kasperpeulen in #10278 (511c0)
- 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)
- Serve framework assets as immutable - by @sheremet-va in #10729 (7af87)
- cache:
- coverage:
- Speed up v8 report generation (bounded-memory merge + precompiled globs) - by @toxik, Claude Opus 5 (1M context) and @AriPerkkio in #10506 (b05e5)
- Reduce RPC data and unnecessary serializations - by @AriPerkkio in #10781 (7e7e3)
- expect:
- spy:
- vm:
- Don't prewarm modules the worker never requests - by @MarshallOfSound and @sheremet-va in #11033 (1e9f8)
- Let environments opt out of the module graph prewarm - by @sheremet-va in #11078 (a6d5e)
View changes on GitHub
Does any of this look wrong? Please let us know.
Commits
See the full diff on Github. The new version differs by more commits than we can show here.