Skip to content

Upgrading @vitest/ui 1 to 2

Breaking1.6.1 → 2.1.9Breaking34Security2New69Changed7Fixed167

BreakingUpgrade verdict

25 breaking changes and 2 security fixes.

  • Remove the empty suite from the runner - (dbbbe).
  • Remove --segfault-retry - (ed60e).
  • Enable coverage.ignoreEmptyLines by default - (31994).
  • Remove watchExclude - (d7371).
Top 5 of 27 that need code or config changes

@vitest/ui publishes an official migration guide for version 2. It covers more than the release notes do.

Documentation ↗

Adds tinyglobby ^0.2.10, tinyrainbow ^1.2.0.

Drops fast-glob, picocolors.

Installs 14 packages in all (was 37).

Breaking25
Remove the empty suite from the runner - (dbbbe).
Remove --segfault-retry - (ed60e).
--segfault-retrythreadsforks
Enable coverage.ignoreEmptyLines by default - (31994).
coverage.ignoreEmptyLines
Remove watchExclude - (d7371).
Change default pool to 'forks' - (7f8f9).
pool'forks'threads
Rename indexScripts to orchestratorScripts in the browser config - (49f34).
indexScriptsorchestratorScripts
Rename indexScripts to orchestratorScripts  -  (49f34).
Change default pool to 'forks'  -  (7f8f9).
pool'forks'
Remove --segfault-retry  -  (ed60e).
Enable coverage.ignoreEmptyLines by default  -  (31994).
coverage.ignoreEmptyLines
Remove watchExclude  -  (d7371).
workspace.
vitest.config.tsvite.config.tsprojects/*projectsprojects/**/*
Add meta to json output - (dd754).
json
Don't exit process if config failed - (f232f).
Add promise-based return assertions, do not auto-resolve returned promises - (5f710).
spy.mock.returnsPromiseresultsspy.mock.settledResultsexpect().toHaveResolved()
api.
process.exit
Run suite hooks in a stack - (1277d).
onTestFinished
Do not exit process if global setup has failed - (ddb09).
Add correct location and snapshot fields in json reporter - (bcccc).
locationlinecolumnincludeTaskLocation
--merge-reports to support coverage - (b7438).
--merge-reports
Support concurrent suites - by @hi-ogawa.
Support overriding exclude in coverage - (169bc).
excludecoverage.exclude
--merge-reports to support coverage  -  (b7438).
--merge-reports
Simplify mock function generic types and align with jest - by @hi-ogawa.
Add "vitest list" API to print collected tests without running them - (583dd).
poolcollectTestsrunTests
Security2
Browser mode serves arbitrary files | CVE-2025-24963.
Remote Code Execution when accessing a malicious website while Vitest API server is listening | CVE-2025-24964.