ℹ️ Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| vitest (source) | ^3.1.3 → ^4.0.18 |
Release Notes
vitest-dev/vitest (vitest)
v4.0.18
🚀 Experimental Features
- experimental: Add
onModuleRunnerhook toworker.init- by @sheremet-va in #9286 <samp>(ea837)</samp>
🐞 Bug Fixes
- Use
meta.urlincreateRequire- by @sheremet-va in #9441 <samp>(e0572)</samp> - browser: Hide injected data-testid attributes - by @sheremet-va in #9503 <samp>(f8989)</samp>
- ui: Process artifact attachments when generating HTML reporter - by @macarie in #9472 <samp>(22543)</samp>
View changes on GitHub
v4.0.17
🚀 Features
- Support openTelemetry for browser mode - by @hi-ogawa in #9180 <samp>(1ec3a)</samp>
- Support TRACEPARENT and TRACESTATE environment variables for OpenTelemetry context propagation - by @Copilot, hi-ogawa and @hi-ogawa in #9295 <samp>(876cb)</samp>
🐞 Bug Fixes
- Improve asymmetric matcher diff readability by unwrapping container matchers - by @Copilot, sheremet-va, hi-ogawa and @hi-ogawa in #9330 <samp>(b2ec7)</samp>
- Improve runner error when importing outside of test context - by @sheremet-va in #9335 <samp>(2dd3d)</samp>
- Replace crypto.randomUUID to allow insecure environments (fix #9… - by @plusgut in #9339 and #9 <samp>(e6a3f)</samp>
- Handle null options in
addEventHandler#9371 - by @ThibautMarechal in #9372 and #9371 <samp>(40841)</samp> - Typo in browser.provider error - by @deammer in #9394 <samp>(4b67f)</samp>
- browser:
- Fix
process.envandimport.meta.envdefines in inline project - by @hi-ogawa in #9239 <samp>(b70c9)</samp> - Fix upload File instance - by @hi-ogawa in #9294 <samp>(b6778)</samp>
- Fix invalid project token for artifacts assets - by @hi-ogawa in #9321 <samp>(caa7d)</samp>
- Log
ErrorEvent.messagewhen unhandledErrorEvent.erroris null - by @hi-ogawa in #9322 <samp>(5d84e)</samp> - Support
fileParallelismon an instance - by @sheremet-va in #9328 <samp>(15006)</samp>
- Fix
- coverage:
- Remove unnecessary
istanbul-lib-source-mapsusage - by @AriPerkkio in #9344 <samp>(b0940)</samp> - Apply patch from istanbuljs/istanbuljs#837 - by @AriPerkkio and sapphi-red in #9413 and #837 <samp>(e05ce)</samp>
- Remove unnecessary
- fsModuleCache:
- Don't store importers in cache - by @sheremet-va in #9422 <samp>(75136)</samp>
- Add importers alongside importedModules - by @sheremet-va in #9423 <samp>(59f92)</samp>
- mocker:
- Fix mock transform with class - by @hi-ogawa in #9421 <samp>(d390e)</samp>
- pool:
- Validate environment options when reusing the worker - by @sheremet-va in #9349 <samp>(a8a88)</samp>
- Handle worker start failures gracefully - by @AriPerkkio in #9337 <samp>(200da)</samp>
- reporter:
- Report test module if it failed to run - by @sheremet-va in #9272 <samp>(c7888)</samp>
- runner:
- Respect nested test.only within describe.only - by @Ujjwaljain16 in #9021 and #9213 <samp>(55d5d)</samp>
- typecheck:
- Improve error message when tsc outputs help text - by @Ujjwaljain16 in #9214 <samp>(7b10a)</samp>
- ui:
- Detect gzip by magic numbers instead of Content-Type header in html reporter - by @Copilot, hi-ogawa and @hi-ogawa in #9278 <samp>(dd033)</samp>
- webdriverio:
- Fall back to WebDriver Classic #9244 - by @JustasMonkev in #9373 and #9244 <samp>(c23dd)</samp>
View changes on GitHub
v4.0.16
🐞 Bug Fixes
- Fix browser mode default testTimeout back to 15 seconds - by @hi-ogawa in #9167 <samp>(da0ad)</samp>
- Avoid crashing on
process.versionsstub - by @AriPerkkio in #9174 <samp>(78cfb)</samp> - Reject calling suite function inside test - by @hi-ogawa in #9198 <samp>(1a259)</samp>
- Allow inlining fully dynamic import - by @hi-ogawa in #9137 <samp>(56851)</samp>
- Fix module graph UI on html reporter with headless browser mode - by @hi-ogawa in #9219 <samp>(60642)</samp>
- Log deprecated
test.poolOptionsif it's set - by @sheremet-va in #9226 <samp>(f7f6a)</samp> - browser:
- Import
recordArtifactfrom the vitest package - by @macarie in #9186 <samp>(01c56)</samp> - Fix
import.meta.envdefine - by @hi-ogawa in #9205 <samp>(01a9a)</samp> - String formatting bug when including placeholders in console.log - by @michael-debs and @hi-ogawa in #9030 and #9131 <samp>(84a30)</samp>
- Import
- coverage:
- Istanbul untested files source maps are off - by @AriPerkkio in #9208 <samp>(372e8)</samp>
- experimental:
- Export
setupEnvironmentfor custom pools - by @AriPerkkio in #9187 <samp>(5d26b)</samp>
- Export
View changes on GitHub
v4.0.15
🚀 Experimental Features
- cache: Add opt-out on a plugin level, fix internal root cache - by @sheremet-va in #9154 <samp>(a68f7)</samp>
- reporters: Print import duration breakdown - by @sheremet-va in #9105 <samp>(122ff)</samp>
🐞 Bug Fixes
- Keep built-in id as is in bun and deno - by @sheremet-va in #9117 <samp>(075ab)</samp>
- Use
optimizeDeps.rolldownOptionsto fix depreated warning + fixssr.external: true- by @hi-ogawa in #9121 <samp>(fd8bd)</samp> - Fix external behavior with
deps.optimizer- by @hi-ogawa in #9125 <samp>(4c754)</samp> - Very minor typo in "Chrome DevTools Protocol" - by @HowToTestFrontend in #9146 <samp>(20997)</samp>
- browser: Run
toMatchScreenshotonly once when used withexpect.element- by @macarie in #9132 <samp>(0d2e7)</samp> - coverage: Istanbul provider to not break source maps - by @AriPerkkio in #9040 <samp>(e4ca9)</samp>
- deps: Update dependency tinyexec to v1 - in #9122 <samp>(fd786)</samp>
- docs: Remove
--browser.providerfrom docs - by @sheremet-va in #9115 <samp>(120b3)</samp> - expect: Preserve
currentTestNamein extended matchers - by @macarie in #9106 <samp>(e4345)</samp> - pool: Terminate workers on
CTRL+cforceful exits - by @AriPerkkio in #9140 <samp>(d57d8)</samp> - reporters: Show project in github reporter - by @sheremet-va in #9138 <samp>(bb65e)</samp>
- spy: Do not mock overriden method, if parent was automocked - by @sheremet-va in #9116 <samp>(1a246)</samp>
- web-worker: MessagePort objects passed to Worker.postMessage work when clone === "native" - by @whitphx in #9118 <samp>(deee8)</samp>
View changes on GitHub
v4.0.14
🚀 Experimental Features
- browser: Expose
utils.configurePrettyDOM- by @sheremet-va in #9103 <samp>(2cc34)</samp> - runner: Add full names to tasks - by @macarie in #9087 <samp>(821aa)</samp>
- ui: Add tabbed failure view for
toMatchScreenshotwith comparison slider - by @macarie in #8813 <samp>(c37c2)</samp>
🐞 Bug Fixes
- Externalize before caching - by @sheremet-va in #9077 <samp>(e1b2e)</samp>
- Collect the duration of external imports - by @sheremet-va in #9097 <samp>(3326c)</samp>
- Rename
collecttoimport, removeprepare- by @sheremet-va in #9091 <samp>(1256b)</samp> - browser:
- Unsubscribe
onCancelon rpc destroy - by @AriPerkkio in #9088 <samp>(f5b72)</samp> - Revert the viewport scaling in non-ui mode #9018 - by @sheremet-va in #9072 and #9018 <samp>(64502)</samp>
- Unsubscribe
- coverage:
- Invalidate circular modules correctly on rerun with coverage - by @aicest in #9096 <samp>(6f22c)</samp>
- expect:
- Allow function as standard schema - by @hi-ogawa in #9099 <samp>(ed8a2)</samp>
- jsdom:
- Reuse abort signals if possible - by @sheremet-va in #9090 <samp>(2c468)</samp>
- pool:
- Init
VITEST_POOL_ID+VITEST_WORKER_IDbefore environment setup - by @AriPerkkio in #9085 <samp>(37918)</samp>
- Init
- web-worker:
postMessageto send ports to workers - by @whitphx and @AriPerkkio in #9078 <samp>(9d176)</samp>
🏎 Performance
- Replace
debugwithobug- by @sxzz and @AriPerkkio in #9057 <samp>(acc51)</samp>
View changes on GitHub
v4.0.13
🐞 Bug Fixes
- types:
- Don't use type from Vite 7.1 - by @sheremet-va in #9071 <samp>(6356b)</samp>
- Don't import node.js dependent types in vitest/browser - by @sheremet-va in #9068 <samp>(332af)</samp>
🏎 Performance
- Avoid fetchModule roundtrip if the module is cached - by @sheremet-va in #9075 <samp>(b27e0)</samp>
- experimental: If
fsCacheModuleis enabled, read from the memory when possible - by @sheremet-va in #9076 <samp>(6b9a1)</samp>
View changes on GitHub
v4.0.12
🐞 Bug Fixes
- Inherit
fsModuleCachePathby default - by @sheremet-va in #9063 <samp>(9a8bc)</samp> - Don't import from
@opentelemetry/apiin public types - by @sheremet-va in #9066 <samp>(e944a)</samp>
View changes on GitHub
v4.0.11
🚀 Experimental Features
- api: Add extensible test artifact API - by @macarie in #8987 <samp>(77292)</samp>
- See more at https://vitest.dev/api/advanced/artifacts
- expect: Provide
taskinMatchState- by @macarie in #9022 <samp>(afd1f)</samp> - experimental: Support OpenTelemetry traces - by @sheremet-va in #8994 <samp>(d6d33)</samp>
- See more at https://vitest.dev/guide/open-telemetry
🏎 Performance
- experimental: Add file system cache - by @sheremet-va in #9026 <samp>(1b147)</samp>
View changes on GitHub
v4.0.10
🐞 Bug Fixes
- Remove
onCancelwhen worker is terminated - by @sheremet-va in #9033 <samp>(6d7f0)</samp> - browser:
- Don't scale the iframe if UI is disabled - by @sheremet-va in #9018 <samp>(5406e)</samp>
- Handle dependency stack traces with external source maps. Resolves: #9003 - by @iclectic in #9016 and #9003 <samp>(57ae5)</samp>
- bun:
- Parsing of stack trace for bun runtime - by @nazarhussain in #9032 <samp>(f3ec6)</samp>
- core:
- Prevent starting new run when cancelling - by @AriPerkkio in #8991 <samp>(eb98d)</samp>
- pool:
- Prevent writing to closed worker - by @AriPerkkio and @sheremet-va in #9023 <samp>(042c6)</samp>
- reporters:
- Report correct test run duration at the end - by @sheremet-va in #8969 <samp>(bc3a6)</samp>
- ui:
- Use execution time from ws reporter (
onFinished) - by @userquin in #8975 <samp>(f56dc)</samp>
- Use execution time from ws reporter (
View changes on GitHub
v4.0.9
🚀 Experimental Features
- expect: Add Set support to toBeOneOf - by @tim-we and @sheremet-va in #8906 <samp>(a415d)</samp>
🐞 Bug Fixes
- browser: Add favicon icons to the browser mode ui - by @userquin in #8972 <samp>(353ee)</samp>
- forks: Increase worker start timeout - by @AriPerkkio in #9027 <samp>(5e750)</samp>
- jsdom: Cloned request is an instance of
Request- by @sheremet-va in #8985 <samp>(506a9)</samp> - ui: Collect file/suite/test duration correctly - by @userquin in #8976 <samp>(8016d)</samp>
View changes on GitHub
v4.0.8
🐞 Bug Fixes
- Workaround
noExternalmerging bug on Vite 6 - by @hi-ogawa in #8950 <samp>(bcb13)</samp> - Missed context.d.ts file - by @termorey in #8965 <samp>(9044d)</samp>
- Incorrect error message for non-awaited
expect.element()- by @StyleShit in #8954 <samp>(9638d)</samp> - browser: Cleanup frame-ancestors from CSP header at coverage middleware - by @userquin in #8941 <samp>(1f730)</samp>
- deps: Update all non-major dependencies - by @sheremet-va in #8636 <samp>(da8b9)</samp>
- forks: Do not fail with Windows Defender enabled - by @sheremet-va in #8967 <samp>(c79f4)</samp>
- runner: Properly encode Uint8Array body in annotations - by @Livan-pro in #8951 <samp>(997ca)</samp>
- spy: Copy static properties if spy is initialised with
vi.fn(), fix types forvi.spyOn(obj, class)- by @sheremet-va in #8956 <samp>(75e7f)</samp> - webdriverio: When no argument is passed to the .click interaction command, the webdriver command should also have no argument - by @julienw in #8937 <samp>(069e6)</samp>
View changes on GitHub
v4.0.7
🐞 Bug Fixes
- Bind
processin case global is overwritten - by @AriPerkkio in #8916 <samp>(6240d)</samp> - Create environment once per worker with
isolate: false- by @sheremet-va in #8915 <samp>(c9078)</samp> - Add Locator as a possible element type in
toContainElement()matcher - by @vitalybaev in #8910 and #8927 <samp>(35a27)</samp> - browser: Inherit
isolateoption, deprecatebrowser.isolate/browser.fileParallelism- by @sheremet-va in #8890 <samp>(9d2b4)</samp> - cli: Parse
--execArgvas array - by @AriPerkkio in #8924 <samp>(751c3)</samp> - jsdom: Support
URL.createObjectURL,FormData.set(prop, blob)- by @sheremet-va in #8935 <samp>(a1b73)</samp> - pool: Avoid
--requireargument when running in deno - by @pi0 in #8897 <samp>(d41fa)</samp> - typecheck: Handle re-runs outside
tsc- by @AriPerkkio in #8920 <samp>(fdb2e)</samp>
🏎 Performance
- pool:
- Sort test files by project by default - by @AriPerkkio in #8914 <samp>(680a6)</samp>
- reporters:
- Optimize getting the tests stats - by @Connormiha in #8908 <samp>(06d62)</samp>
- Remove unnecessary
Array.fromcall - by @Connormiha in #8907 <samp>(b6014)</samp>
View changes on GitHub
v4.0.6
🐞 Bug Fixes
- Don't merge errors with different diffs for reporting - by @hi-ogawa in #8871 <samp>(3e19f)</samp>
- Do not throw when importing a type from an external package - by @sheremet-va in #8875 <samp>(7e6c3)</samp>
- Improve spying types - by @sheremet-va in #8878 <samp>(ca041)</samp>
- Reuse the same environment when
isolateandfileParallelismare false - by @sheremet-va in #8889 <samp>(31706)</samp> - browser:
- Support module tracking - by @sheremet-va in #8877 <samp>(9e24a)</samp>
- Ensure setup files are re-evaluated on each test run - by @yjaaidi in #8883 and #8884 <samp>(f50ea)</samp>
- coverage:
- Prevent filtering out virtual files before remapping to sources - by @AriPerkkio in #8860 <samp>(e3b77)</samp>
- happy-dom:
- Properly teardown additional keys - by @sheremet-va in #8888 <samp>(10a06)</samp>
- jsdom:
- Pass down Node.js
FormDatatoRequest- by @sheremet-va in #8880 <samp>(197ca)</samp>
- Pass down Node.js
View changes on GitHub
v4.0.5
🐞 Bug Fixes
- Respect
ssr.noExternalwhen externalizing dependencies - by @sheremet-va in #8862 <samp>(a4f86)</samp> - Allow module in --config - by @sheremet-va in #8864 <samp>(b9521)</samp>
- browser: Allow
Locatortype in selectOptions element parameter - by @rzzf and @sheremet-va in #8848 <samp>(7ee28)</samp> - module-runner: Don't return node builtins for
getBuiltinsunconditionally - by @sapphi-red in #8863 <samp>(0e858)</samp> - pool: Rename
groupIdtogroupOrderin error message - by @Yohannfra in #8856 <samp>(b9aab)</samp>
🏎 Performance
- Pass testfiles at once when
--no-isolate --maxWorkers=1- by @AriPerkkio in #8835 <samp>(584aa)</samp> - expect: Optimize checking the input type - by @Connormiha in #8840 <samp>(06968)</samp>
View changes on GitHub
v4.0.4
🐞 Bug Fixes
- browser:
- Correct typo - by @benmccann in #8796 <samp>(ede1f)</samp>
- Publish a missing context file for webdriverio - by @sheremet-va in #8824 <samp>(7c7b6)</samp>
- mocker:
- Support mocking builtins without
node:prefix - by @sheremet-va in #8829 <samp>(06208)</samp>
- Support mocking builtins without
- pool:
- Runner's error listener causing
MaxListenersExceededWarning- by @AriPerkkio in #8820 <samp>(d1bff)</samp> - Capture workers
stdioto logger - by @AriPerkkio in #8809 <samp>(fb95f)</samp>
- Runner's error listener causing
- spy:
- Allow classes in
vi.mockedutility - by @sheremet-va in #8839 <samp>(f8756)</samp>
- Allow classes in
- worker:
- Rpc listener leak when
isolate: false- by @AriPerkkio in #8821 <samp>(573dc)</samp>
- Rpc listener leak when
🏎 Performance
- utils: Optimized reducer to avoid creating new objects - by @Connormiha in #8818 <samp>(d19ce)</samp>
View changes on GitHub
v4.0.3
🐞 Bug Fixes
- Preserve reporter options from config when CLI reporters override them - by @Copilot and sheremet-va in #8794 <samp>(15552)</samp>
- browser: More stable in-source testing validation - by @sheremet-va in #8793 <samp>(62297)</samp>
- happy-dom: Support fetch globals - by @sheremet-va in #8791 <samp>(0fb74)</samp>
- init: Use correct jsx/tsx extension - by @sheremet-va in #8792 <samp>(abc04)</samp>
View changes on GitHub
v4.0.2
🐞 Bug Fixes
- browser:
- Don't print the deprecation notice in node_modules - by @sheremet-va in #8779 <samp>(588f7)</samp>
- pool:
- Assign envs before running tests to keep in sync with process.env - by @sheremet-va in #8769 <samp>(26ce8)</samp>
- spy:
- Properly inherit implementation's
length- by @sheremet-va in #8778 <samp>(d4c2b)</samp> - Reset spies if both
restoreMocksandmockResetis set in the config - by @sheremet-va in #8781 <samp>(2eedb)</samp>
- Properly inherit implementation's
View changes on GitHub
v4.0.1
🐞 Bug Fixes
- Move the
getBuiltinscheck - by @sheremet-va in #8765 <samp>(81000)</samp> - pool: Don't teardown the communication channel too soon if something is running after the test - by @sheremet-va in #8767 <samp>(3fae7)</samp>
View changes on GitHub
v4.0.0
🚨 Breaking Changes
- Remove
'basic'reporter - by @AriPerkkio in #7884 <samp>(82fcf)</samp> - Simplify default exclude pattern - by @sheremet-va in #6287 <samp>(14c50)</samp>
- Remove deprecated getSourceMap - by @sheremet-va in #8194 <samp>(ff934)</samp>
- Replace deprecated ErrorWithDiff with TestError - by @sheremet-va in #8195 <samp>(da59e)</samp>
- Remove UserConfig type in favor of ViteUserConfig - by @sheremet-va in #8196 <samp>(22f7f)</samp>
- Remove deprecated coverage options in favor of
vitest/nodeexports - by @sheremet-va in #8197 <samp>(dc848)</samp> - Remove deprecated internal helpers and environment exports - by @sheremet-va in #8198 <samp>(4703c)</samp>
- Remove deprecated typecheck and runner types - by @sheremet-va in #8199 <samp>(89a1c)</samp>
- Remove Node types from the main entry point, use
vitest/nodeinstead - by @sheremet-va in #8200 <samp>(1e60c)</samp> - Remove support for Vite 5 - by @sheremet-va in #8202 <samp>(cb8b0)</samp>
- Remove deprecated types - by @sheremet-va in #8203 <samp>(66bee)</samp>
- Remove deprecated environmentMatchGlobs and poolMatchGlobs - by @sheremet-va in #8205 <samp>(be11d)</samp>
- Remove deprecated
workspaceoption in favor ofprojects- by @sheremet-va in #8218 <samp>(76fb7)</samp> - Ignore
--standalonewhen CLI filename filter is used - by @AriPerkkio in #8262 <samp>(013bf)</samp> - Use module-runner instead of vite-node - by @sheremet-va and @AriPerkkio in #8208 <samp>(9be01)</samp>
- Rewrite spying implementation to make module mocking more intuitive - by @sheremet-va in #8363 <samp>(9e412)</samp>
- Remove deprecated APIs - by @sheremet-va in #8428 <samp>(a1cb9)</samp>
- Remove
minWorkersand set it automatically to 0 in non watch mode - by @sheremet-va in #8454 <samp>(2c2d1)</samp> - Verbose reporter prints tests in a list, introduce
treereporter - by @sheremet-va and @AriPerkkio in #8500 <samp>(25fd3)</samp> - Include shadow root contents in pretty-format output - by @wkillerud in #8545 <samp>(9e722)</samp>
- Remove deprecated order from test() API - by @sheremet-va in #8594 <samp>(4d419)</samp>
- Rewrite pools without
tinypool- by [
Configuration
📅 Schedule: 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.