Vitest v5.1.2stable Released Nov 25, 2026
Impact Score: 3/10

Vitest v5.1.2 - Release Notes & Engineering Impact

Source available - automated, not human-reviewed

Component: vitest · Channel: stable. Automated analysis, not a compatibility certification. How this works.

Analysis updated: 2026-11-25.

Compatibility not verified - check source notes
📄 .MD
⚡ Executive Summary (TL;DR)

Vitest v5.1.2 is a patch release delivering targeted bug fixes across browser testing, coverage, mocking, snapshots, and the UI, alongside three runtime performance optimizations. Teams benefit from more reliable error reporting, deduplicated coverage metrics, and faster source map handling, deep equality checks, and dynamic import discovery.

Who Does This Impact? (Role-Based Analysis)

💻 Software Engineers & Devs

Upgrade if you rely on browser mode mocking or screenshots, snapshot retries, Bun worker pools, or want faster deep equality assertions and dynamic import mocking.

📊 Product & Engineering Leads

This maintenance patch introduces no new end-user capabilities, focusing instead on test runner stability and execution speed.

⚙️ DevOps & Security

CI pipelines may see marginal speedups from cached external source map reads, and any scripts passing `--changed` to `vitest related` should be checked since that flag combination is now disallowed.

⚡ Performance & Enhancements (3)

  • Read external source maps once per run for improved performance
  • expect: Reuse the key array during deep equality checks
  • mocker: Find dynamic imports using es-module-lexer

🔧 Bug Fixes & Patches (12)

  • Report global setup errors instead of displaying "no test files"
  • Warn when multiple projects attach the same file
  • browser: Avoid failing trace when a locator has no match for non-Playwright providers
  • browser: Save failure screenshots per browser instance
  • browser: Mock assets and computed dynamic imports
  • cli: Disallow `--changed` in `vitest related`
  • coverage: Prevent duplicate metrics caused by source map end column differences
  • deps: Update all non-major dependencies
  • mocker: Transform a factory-mocked module only once
  • pool: Handle failed forks worker startup on Bun
  • snapshot: Remove new snapshots created during a failed retry
  • ui: Ensure `detailsPosition: bottom` for auto-opened trace view

❓ Frequently Asked Questions

Does Vitest v5.1.2 contain breaking changes?

The release notes do not explicitly document any breaking changes or required migrations, though missing breaking-change evidence does not guarantee complete compatibility; notably, the CLI now disallows `--changed` when running `vitest related`.

What is the primary highlight of v5.1.2?

The release combines stability fixes for browser mode, coverage deduplication, global setup error reporting, and snapshot retries with performance optimizations for external source maps, deep equality checks, and `es-module-lexer`-based dynamic import detection.

How should teams prepare to upgrade to v5.1.2?

Verify that no CI commands or npm scripts pass `--changed` to `vitest related`, then run your existing test suite after updating to confirm expected behavior across browser tests, coverage reports, and snapshot retries.

📄 View Raw Release Notes (Original Developer Log)
### &nbsp;&nbsp;&nbsp;🐞 Bug Fixes - Report global setup errors instead of &quot;no test files&quot; &nbsp;-&nbsp; by @jszumski and **Claude Opus 5.5** in https://github.com/vitest-dev/vitest/issues/12031 [<samp>(b7572)</samp>](https://github.com/vitest-dev/vitest/commit/b7572c1e6) - Warn when projects attach the same file &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/12043 [<samp>(5f884)</samp>](https://github.com/vitest-dev/vitest/commit/5f8847345) - **browser**: - Don&#39;t fail trace when locator has no match for non-playwright providers &nbsp;-&nbsp; by @hi-ogawa and **Claude Opus 5.5** in https://github.com/vitest-dev/vitest/issues/11975 [<samp>(f0500)</samp>](https://github.com/vitest-dev/vitest/commit/f05003327) - Save failure screenshots per instance &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/12042 [<samp>(e0e8e)</samp>](https://github.com/vitest-dev/vitest/commit/e0e8e0000) - Mock assets and computed dynamic imports &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/11954 [<samp>(c6ad9)</samp>](https://github.com/vitest-dev/vitest/commit/c6ad97dec) - **cli**: - Disallow --changed in vitest related &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/12038 [<samp>(b3a80)</samp>](https://github.com/vitest-dev/vitest/commit/b3a803b1f) - **coverage**: - Prevent duplicate metrics caused by source map end column differences &nbsp;-&nbsp; by @AriPerkkio in https://github.com/vitest-dev/vitest/issues/12040 [<samp>(45d19)</samp>](https://github.com/vitest-dev/vitest/commit/45d199c58) - **deps**: - Update all non-major dependencies &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/12050 [<samp>(ff6b4)</samp>](https://github.com/vitest-dev/vitest/commit/ff6b4275f) - **mocker**: - Transform a factory-mocked module once &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/12027 [<samp>(8b0ca)</samp>](https://github.com/vitest-dev/vitest/commit/8b0ca603a) - **pool**: - Handle failed forks worker start on bun &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/12039 [<samp>(4aec8)</samp>](https://github.com/vitest-dev/vitest/commit/4aec89426) - **snapshot**: - Remove new snapshots of a failed retry &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/12052 [<samp>(21238)</samp>](https://github.com/vitest-dev/vitest/commit/2123874a4) - **ui**: - Ensure `detailsPosition: bottom` for auto-opened trace view &nbsp;-&nbsp; by @hi-ogawa and **Claude Opus 5.5** in https://github.com/vitest-dev/vitest/issues/12016 [<samp>(366ac)</samp>](https://github.com/vitest-dev/vitest/commit/366ac633b) ### &nbsp;&nbsp;&nbsp;🏎 Performance - Read external source maps once per run &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/12106 [<samp>(b5a55)</samp>](https://github.com/vitest-dev/vitest/commit/b5a553395) - **expect**: Reuse the key array in deep equality &nbsp;-&nbsp; by @camc314 in https://github.com/vitest-dev/vitest/issues/12104 [<samp>(f88ab)</samp>](https://github.com/vitest-dev/vitest/commit/f88ab6cc3) - **mocker**: Find dynamic imports with es-module-lexer &nbsp;-&nbsp; by @sheremet-va in https://github.com/vitest-dev/vitest/issues/12028 [<samp>(5812e)</samp>](https://github.com/vitest-dev/vitest/commit/5812ec58f) ##### &nbsp;&nbsp;&nbsp;&nbsp;[View changes on GitHub](https://github.com/vitest-dev/vitest/compare/v5.1.1...v5.1.2)
← Older Version Vitest v5.1.1