[!NOTE] This PR body was truncated due to platform limits.
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| vitest (source) | ^0.13.1 → ^5.0.5 |
Release Notes
vitest-dev/vitest (vitest)
v5.0.5
🐞 Bug Fixes
- Keep vite default
fs.denywith api token file - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11578 <samp>(28dc1)</samp> - Handle quoted file names in
--changed- by @sheremet-va in #11583 <samp>(14921)</samp> - Add
datato theimport.meta.hotstub - by @sheremet-va in #11590 <samp>(3a828)</samp> - Set
skipinskipIf, ignoreundefinedoptions - by @sheremet-va in #11591 <samp>(d523a)</samp> - Skip builtin loading in async leak detector - by @sheremet-va in #11598 <samp>(fe86a)</samp>
- Keep the import frame in native loader errors - by @sheremet-va in #11599 <samp>(9697b)</samp>
- Run hook cleanups when a later hook fails - by @sheremet-va in #11605 <samp>(6c5a4)</samp>
- Release mocks of finished test files - by @sheremet-va in #11607 <samp>(e9c3d)</samp>
- Abort all running tests on cancel - by @sheremet-va in #11606 <samp>(6621a)</samp>
- browser:
- Ignore synthetic pagehide events - by @sheremet-va in #11582 <samp>(ca081)</samp>
- Run plugin buildStart on server creation - by @sheremet-va in #11593 <samp>(ea611)</samp>
- Drop late connections of closed sessions - by @sheremet-va in #11600 <samp>(f161e)</samp>
- Wait 30s for the browser to close - by @sheremet-va in #11601 <samp>(6498b)</samp>
- Run global setup once with instances - by @sheremet-va in #11596 <samp>(8dd67)</samp>
- reporter:
- End reason
&#​39;failed&#​39;on worker crash - by @AriPerkkio in #11568 <samp>(6ae8e)</samp>
- End reason
View changes on GitHub
v5.0.4
🚀 Features
- experimental:
- Tag cache directories with CACHEDIR.TAG - by @lifeiscontent in #11461 <samp>(a8ea3)</samp>
- Support
test.ui.themeoption - by @sheremet-va in #11499 <samp>(1da66)</samp> - Highlight selector multiple matches in trace view - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11489 <samp>(5abba)</samp>
- Print how many tests were affected and a total when running
--changed- by @sheremet-va in #11424 <samp>(a2336)</samp> - Add an option to cache dependencies instead of statically parsing them - by @sheremet-va in #11515 <samp>(c0601)</samp>
- Add fit and zoom controls to trace viewer - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11490 <samp>(f5dd9)</samp>
🐞 Bug Fixes
- Fail the run on git and location filter errors - by @sheremet-va in #11430 <samp>(30d03)</samp>
- Enable fsModuleCache by default - by @sheremet-va in #11435 <samp>(ad208)</samp>
- Track project files and mocks with --changed - by @sheremet-va in #11432 <samp>(b0f2b)</samp>
- Refactor caching, fix
:in project and change the shape ofresultscache - by @sheremet-va in #11453 <samp>(9673c)</samp> - Keep full
$string values whentaskTitleValueFormatTruncateis 0 - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11485 <samp>(4f7e1)</samp> - Resolve node builtins in client environments - by @sheremet-va in #11417 <samp>(56b31)</samp>
- Fix module graph builtin externals after #11421 - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11491 and #11421 <samp>(008e1)</samp>
- Wrap module mocks during in-source testing - by @sheremet-va in #11505 <samp>(36d19)</samp>
- Handle line endings in snapshot - by @sheremet-va in #11522 <samp>(4c468)</samp>
- Respect root in projects - by @sheremet-va in #11521 <samp>(26642)</samp>
- Resolve mocks in directories with spaces - by @sheremet-va in #11539 <samp>(caaef)</samp>
- api:
- Publish the api token atomically - by @umairnawaz333 in #11323 <samp>(6f990)</samp>
- browser:
- Close the mock route interception race - by @cplieger and @sheremet-va in #8339 and #11083 <samp>(d6620)</samp>
- Allow toHaveTextContent without arguments - by @nomadical in #11425 <samp>(8ebcf)</samp>
- Apply API options without browser config - by @sheremet-va in #10852 <samp>(ad055)</samp>
- Preserve undefined command arguments - by @sheremet-va and @AriPerkkio in #11497 <samp>(1576d)</samp>
- Wait for setup mocks before importing a test file - by @kasperpeulen in #11520 <samp>(b61d1)</samp>
- Avoid extra scroll outside the iframe - by @sheremet-va in #11523 <samp>(662e8)</samp>
- Run browser instances as workers - by @sheremet-va in #11525 <samp>(bf04b)</samp>
- ⚠️ This can degrade performance if you have a custom
maxWorkerssetting. Previously, it was applied incorrectly and could lead to Vitest using too many resources. For example, a lower number would still open too many browsers. Fixing it means Vitest opens less instances by default now.
- ⚠️ This can degrade performance if you have a custom
- Open one cdp session per tester - by @sheremet-va in #11542 <samp>(69e63)</samp>
- Clean up unmocked and pending mocks - by @sheremet-va in #11537 <samp>(5c955)</samp>
- coverage:
- V8 browser memory leak between test files - by @AriPerkkio in #11466 <samp>(2297d)</samp>
allowExternalfails to include uncovered files - by @AriPerkkio in #11513 <samp>(4ef00)</samp>- Filenames containing brackets incorrectly showing as uncovered - by @AriPerkkio in #11531 <samp>(0fa80)</samp>
- Istanbul coverage wrong when module transform warmups - by @AriPerkkio in #11529 <samp>(9f61d)</samp>
- deps:
- Update all non-major dependencies - by @sheremet-va in #11167 <samp>(c74e0)</samp>
- expect:
- Fix
MapandSetdeep equality in some assertions - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11402 <samp>(b4e79)</samp> - Check value in chai-style returned - by @sheremet-va in #11500 <samp>(1aca0)</samp>
- Fix
- mocker:
- Fix native loader mocking edge cases - by @sheremet-va in #11540 <samp>(cd423)</samp>
- pretty-format:
- Support boxed symbols - by @lehni in #11445 and #11446 <samp>(eba44)</samp>
- reporters:
- Junit to strip ANSI sequences from all XML attributes - by @meganemura and Claude Opus 5.5 in #11407 <samp>(e1a73)</samp>
- runner:
- Don't cache failed fixture setups - by @hamed-bavar in #11237 and #11238 <samp>(4ee66)</samp>
- typecheck:
- Use typescript pool in toTestSpecification - by @sheremet-va in #11451 <samp>(5f273)</samp>
- ui:
- Remove duplicate browser-open call opening two tabs - by @feastyr69 in #11356 and #11358 <samp>(d7e13)</samp>
- Simplify explorer filtering + fix nested tests when search matches a suite - by @hi-ogawa, Hiroshi Ogawa, Codex and Claude Opus 5.5 in #11262 <samp>(a627b)</samp>
- Store module graph once per environment - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11421 <samp>(af903)</samp>
- Mount index.html handler on the ui base path - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11517 <samp>(1bc24)</samp>
- Center split pane resize handle - by @hi-ogawa, Hiroshi Ogawa and Claude Opus 5.5 in #11506 <samp>(e658b)</samp>
- vm:
- Bind
thistomodule.exports- by @sheremet-va in #11504 <samp>(b618a)</samp>
- Bind
🏎 Performance
- Reuse fsModuleCache when filtering by source - by @sheremet-va in #11428 <samp>(7ebd9)</samp>
- spy: Reset only mocks that were called or reconfigured - by @johan-gorter and Claude Opus 5.5 in #11197 <samp>(28ef9)</samp>
View changes on GitHub
v5.0.3
🐞 Bug Fixes
- Isolate
result.statusbetweenrepeatsruns - by @hi-ogawa, Hiroshi Ogawa and Codex (GPT-6) in #11218 <samp>(5dbeb)</samp> - Don't print an interceptor warning in browser mode - by @sheremet-va in #11377 <samp>(15cc0)</samp>
- Don't retry when
test.failsexpectedly failed - by @hi-ogawa, Hiroshi Ogawa and Codex (GPT-6) in #11219 <samp>(b2458)</samp> - Scope cache key generators to projects - by @ecoyoung in #11281 and #11301 <samp>(92ba7)</samp>
- browser:
- Delay server
listenuntil tests start running - by @sheremet-va in #11366 <samp>(7d8ed)</samp> - Check mock path boundaries - by @saryn17, Ryosei Sato and @sheremet-va in #11361 and #11362 <samp>(1c388)</samp>
- Keep config of browser-consumed environments - by @kasperpeulen and Claude in #11378 <samp>(aafc0)</samp>
- Ignore page crash while cancelling - by @sheremet-va in #11386 <samp>(7c367)</samp>
toMatchScreenshotuses wrong reference on retried tests - by @macarie in #11393 <samp>(c22ab)</samp>
- Delay server
- cache:
- Revalidate imports of cached modules - by @sheremet-va in #11381 <samp>(38f98)</samp>
- deps:
- Pin
why-is-node-runningto3.2.1to avoid users running intoERR_PNPM_TRUST_DOWNGRADE- by @AriPerkkio in #11403 <samp>(f6c9a)</samp>
- Pin
- expect:
- Pass current equality testers to
expect.extendasymmetric matchers - by @hi-ogawa, Hiroshi Ogawa and Claude in #11401 <samp>(3e794)</samp>
- Pass current equality testers to
- jsdom:
- Support Blob on jsdom 30.1 - by @sheremet-va in #11379 <samp>(6c49b)</samp>
- pool:
- Preserve unique pool ids when
groupOrderis set - by @mtorp in #11392 <samp>(50312)</samp>
- Preserve unique pool ids when
- ui:
- Split-pane handle overlapping iframe - by @macarie in #11221 <samp>(f91db)</samp>
- vitest:
- Remove root temp dir on close - by @abhinav-phi in #11248 <samp>(7c711)</samp>
- vm:
- Do not optimize deps from index.html - by @ezefernandezyf, Hiroshi Ogawa and Codex (GPT-6) in #11329 and #11360 <samp>(caf28)</samp>
- Don't reuse scripts across vite environments - by @MO2k4, Martin Oehlert and Claude in #11395 <samp>(346d3)</samp>
View changes on GitHub
v5.0.2
🐞 Bug Fixes
- Bind
processin case global is overwritten - by @AriPerkkio in #11343 <samp>(0b792)</samp> - detect-async-leaks:
- Ignore
process.stdiohandles - by @AriPerkkio in #11333 <samp>(0fd6b)</samp>
- Ignore
- expect:
- Fix
toMatchObjectwith asymmetric matchers - by @ShreeBohara, Claude Opus 5, @hi-ogawa, Hiroshi Ogawa and Codex (GPT-5) in #11100 <samp>(42523)</samp>
- Fix
- jsdom:
- Fix
RequestwithBlobbody on jsdom 28+ - by @harshit-d3v in #11295 <samp>(d1c3e)</samp>
- Fix
- reporter:
agentto respect--silent- by @Raj4478 and @AriPerkkio in #11271 <samp>(5b95e)</samp>
- reporters:
- Handle concurrent
createReportcalls - by @7rulnik in #11278 <samp>(e8e55)</samp> hanging-processto use ESM entrypoint - by @AriPerkkio in #11316 <samp>(4e91e)</samp>
- Handle concurrent
- spy:
- Fix stack overflow when spying
Set.prototype.add- by @fengmk2 in #11299 <samp>(a0a93)</samp>
- Fix stack overflow when spying
- ui:
- Persist authentication cookie beyond current browser session - by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11066 <samp>(f8819)</samp>
View changes on GitHub
v5.0.1
🚀 Features
- ui:
- Move trace attempts selector to viewer header - by @hi-ogawa, Hiroshi Ogawa and Codex in #11189 <samp>(5dc4b)</samp>
- Add focused trace view layout mode - by @hi-ogawa, Hiroshi Ogawa, OpenCode (gpt-5.6-sol) and Codex in #11190 <samp>(376dc)</samp>
🐞 Bug Fixes
- Exit 1 when vitest list fails collection - by @hamed-bavar in #11145 and #11146 <samp>(6108b)</samp>
- Keep parse error details in static collection - by @hamed-bavar in #11150 and #11151 <samp>(7c818)</samp>
- Avoid recursive prototype in automocking - by @sheremet-va in #11195 <samp>(99fc5)</samp>
- Prevent false Vitest import resolution - by @sheremet-va in #11196 <samp>(b426c)</samp>
- Keep metadata file when clearing the cache - by @sheremet-va in #11199 <samp>(73614)</samp>
- Correct typos in error message and comments - by @shinji00222 and Shinji in #11187 <samp>(115c3)</samp>
- Resolve ResolvedConfig exactOptionalPropertyTypes errors - by @LukeAbby in #11175 <samp>(498fb)</samp>
- Share the server on self-referencing
extends- by @sheremet-va in #11034 <samp>(23dda)</samp> - Warn when deprecated
deps.optimizer.webis used - by @im10furry in #11214 <samp>(2ce29)</samp> - browser:
- Avoid double quotes in
config.define- by @sheremet-va in #11198 <samp>(972e2)</samp>
- Avoid double quotes in
- doctor:
- Measure vm pools for custom environments - by @sheremet-va in #11212 <samp>(91ab1)</samp>
- expect:
- Correct return value in
toMatchAriaSnapshot- by @sheremet-va in #11208 <samp>(c119b)</samp>
- Correct return value in
- fakeTimers:
- Force
queueMicrotaskandnextTickintoNotFake- by @kingmakeruix, kingmakeruix, Hiroshi Ogawa, Codex and @hi-ogawa in #11261 <samp>(a47d7)</samp>
- Force
- snapshot:
- Report obsolete keys next to skipped tests - by @hamed-bavar, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #11157 and #11158 <samp>(17e2b)</samp>
- types:
- Make public declarations self-contained - by @ZoeySigel in #11141 <samp>(45546)</samp>
- ui:
- Fix collapse/expand suite with file name search - by @hi-ogawa, Hiroshi Ogawa and Codex in #11260 <samp>(0a712)</samp>
- Fix explorer file summary count - by @hi-ogawa, Hiroshi Ogawa, OpenCode (gpt-5.6-sol) and Codex in #11125 <samp>(05982)</samp>
- utils:
- Fix
deepMergeto handle prototype - by @hi-ogawa, Hiroshi Ogawa and Codex in #11215 <samp>(4944c)</samp>
- Fix
View changes on GitHub
v5.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 <samp>(3f802)</samp> - Remove quotes from string values in
test.for/eachtitle$variable (take 2) - by @hi-ogawa in #10170 <samp>(04d37)</samp> - Default
attachmentsDirfrom.vitest-attachements/to.vitest/attachments/- by @MdSadiqMd in #10186 <samp>(1ba73)</samp> - Remove
sequentialtest/suite options in favor ofconcurrent- by @hi-ogawa and OpenAI Codex in #10198 <samp>(9229f)</samp> - Represent locator as an object instead of a string - by @sheremet-va in #10212 <samp>(80f07)</samp>
- Inline
expectpackage - by @sheremet-va in #10221 <samp>(ad162)</samp> - Remove deprecated entry points - by @sheremet-va in #10222 <samp>(994c6)</samp>
- Require Node.js 22 and Vite 6.4 - by @sheremet-va in #10178 <samp>(38762)</samp>
- Fail
expect.pollwhen function didn't resolve in time - by @hi-ogawa and OpenAI Codex in #10233 <samp>(4df04)</samp> - Throw an error if hoistable methods are outside the top level scope - by @sheremet-va in #10460 <samp>(d0b4f)</samp>
toHaveTextContentis strict, addtoMatchTextContentas alternative - by @sheremet-va in #10473 <samp>(18f30)</samp>- Don't lookup config file from ancestor directories - by @hi-ogawa, OpenAI Codex and Hiroshi Ogawa in #10428 <samp>(945d9)</samp>
- Inline
@vitest/runnerpackage, do not publish it anymore - by @sheremet-va in #10511 <samp>(6d6e4)</samp> - Allow mutating happy-dom/jsdom window object - by @hi-ogawa, Hiroshi Ogawa and OpenAI Codex in #10373 <samp>(206e8)</samp>
- Expose
concurrencyId/workerIdon TestModule's diagnostics, make id 1-based - by @sheremet-va in #10516 <samp>(bdd98)</samp> - Add
screenshotDirectoryconfig tobrowser.expect.toMatchScreenshot- by @macarie in #10592 <samp>(a60de)</samp> - Update
@sinonjs/fake-timersand support mockingTemporal- by @hi-ogawa, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10654 <samp>(f8b15)</samp> - Remove webdriverio package - by @sheremet-va in #10675 <samp>(5fed6)</samp>
- Clear mocks by default before each test - by @sheremet-va in #10613 <samp>(0f646)</samp>
- Don't emit localStorage warnings on Node 26, fail gracefully when worker fails to start - by @sheremet-va in #10293 <samp>(334ed)</samp>
- Separate config resolution from the server creation - by @sheremet-va in #10554 <samp>(1c0ec)</samp>
- Inline projects extend the root config by default - by @sheremet-va in #10750 <samp>(fec00)</samp>
- Enable mocking Temporal without fake timers - by @fabon-f, Hiroshi Ogawa and OpenCode (gpt-5.6-sol) in #10757 <samp>(ac2d4)</samp>
- Support nested projects - by @sheremet-va in #10846 <samp>(ec367)</samp>
- Use
>as separator in-t, calculateonlyonce - by @sheremet-va in #10686 <samp>(a0b20)</samp> - Fail the test when an asynchronous assertion is not awaited - by @sheremet-va in #10868 <samp>(86d4a)</samp>
- Share the Vite server between inline projects - by @sheremet-va in #10848 <samp>(d87c9)</samp>
- Parse files statically in vitest list by default - by @sheremet-va in #11088 <samp>(51e94)</samp>
- benchmark:
- Rewrite the public API - by @sheremet-va in #10113 <samp>(19f6e)</samp>
- browser:
- Iframe scale - by @macarie in #9745 <samp>(b6398)</samp>
- Enable
locators.exactby default - by @sheremet-va in #10430 <samp>(e2032)</samp> - Require
sessionIdfor orchestrator html request - by @hi-ogawa, Hiroshi Ogawa and OpenAI Codex in #10522 <samp>(79b7d)</samp> - Save failure screenshots in
attachmentsDir- by @macarie in #10917 <samp>(3b5bb)</samp>
- coverage:
include/excludeglobs too eager - by @AriPerkkio in #9818 <samp>(edacb)</samp>- Allow
thresholds.perFileto accept an object - by @vladlenskiy and @AriPerkkio in #10190 <samp>(13b78)</samp>
- expect:
- Fix
toThrow("")behavior by reverting #6710 - by @hi-ogawa in #9643 and #6710 <samp>(6c3e4)</samp>
- Fix
- mocker:
- Deserialize automock as automock - by @nami8824 in #10192 <samp>(2f892)</samp>
- reporters:
blobreporter and--merge-reportsdefault to.vitest/blob/- by @AriPerkkio in #10232 <samp>(d22b0)</samp>- Write json and junit reporter output files to
.vitestby default - by @hi-ogawa, Hiroshi Ogawa, OpenCode (gpt-5.6-sol) and @AriPerkkio in #10621 <samp>(58577)</samp>
- spy:
- Preserve class mock prototype methods on instances - by @sheremet-va in #10910 <samp>(6093d)</samp>
- types:
- Add better promise support in expects and matchers - by @samchungy and @sheremet-va in #8266 <samp>(41f55)</samp>
- ui:
- Harden UI API access - by @hi-ogawa, Hiroshi Ogawa and OpenAI Codex in #10583 <samp>(4c26d)</samp>
- Change html reporter default output to
.vitest- by @hi-ogawa and Hiroshi Ogawa in #10620 <samp>(29c36)</samp>
🚀 Features
- Add
createReportand.vitestreport directory convention - by @AriPerkkio in #9993 <samp>(72a6d)</samp> - Expose default reporters through
configDefaults.reporters- by @hi-ogawa and Claude Opus 5 (1M context) in #10219 <samp>(083f6)</samp> - 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 <samp>(e60b2)</samp>
- Add
logger.formatError- by @hi-ogawa and OpenAI Codex in #10268 <samp>(2c5f3)</samp> - Support typescript build mode - by @lishaduck in #9870 <samp>(106da)</samp>
- Add toggable
injectCjsGlobalsoption - by @sheremet-va in #10709 <samp>(82671)</samp> - Promote fsModuleCache to a top-level option - by @sheremet-va in #10734 <samp>(78ed7)</samp>
- Support non-ascii characters in
for/eachtitle placeholders - by @k-yle in #10773 <samp>(15e0a)</samp> - Report the duration breakdown as percentages - by @sheremet-va and @AriPerkkio in #10820 <samp>(c67d2)</samp>
- Promote parseSpecifications out of experimental - by @sheremet-va in #11087 <samp>(b628c)</samp>
- Promote clearCache out of experimental - by @sheremet-va in #11086 <samp>(d4fe1)</samp>
- api:
- Expose logs recorded during the test - by @sheremet-va in #10277 <samp>(cba20)</samp>
- benchmark:
- Add pluggable benchmark provider API - by @GuillaumeLagrange and @sheremet-va in #10799 <samp>(86c70)</samp>
- browser:
- Export aria tree utils - by @hi-ogawa in #10171 <samp>(c3423)</samp>
- Support dom snapshot trace view - by @hi-ogawa, Claude Opus 5 (1M context) and OpenAI Codex in #10102 <samp>(7eddd)</samp>
- Provide project reference in
ToMatchScreenshotResolvePath- by @macarie and @sheremet-va in #10138 <samp>(16654)</samp> - Show aria tree on locator element error - by @hi-ogawa and OpenAI Codex in #10257 <samp>(04f04)</samp>
- Support custom
kindinpage.mark- by @AriPerkkio in #10302 <samp>(053e8)</samp> - Live update trace view on watch UI - by @hi-ogawa and OpenAI Codex in #10296 <samp>(78c11)</samp>
- Add
context.markfor custom command tracing - by @AriPerkkio in #10329 <samp>(aa514)</samp> - Show trace view steps in editor panel - by @hi-ogawa and OpenAI Codex in #10404 <samp>(8c4b6)</samp>
- Display nested mark trace in UI - by @hi-ogawa, Hiroshi Ogawa and OpenAI Codex in #10437 <samp>(86ffc)</samp>
- cli:
[!IMPORTANT] ✂ PR body was truncated to here.
Configuration
📅 Schedule: (UTC)
- Branch creation
- At any time (no schedule defined)
- Automerge
- At any time (no schedule defined)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.