Skip to content

V52.1: Vitest 5, measured against Vitest 4 - #115

Merged
dapiced merged 1 commit into
mainfrom
claude/labml-improvements-ipscw1
Oct 9, 2026
Merged

dapiced merged 1 commit into
mainfrom
claude/labml-improvements-ipscw1

Conversation

@dapiced

@dapiced dapiced commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Summary

This is the first of V52's three major upgrades, each in its own PR as V44 requires: Vitest, then vite-plugin-pwa, then TypeScript 7.

Before touching anything

  • I read the Vitest 5 migration guide.
  • I searched the repo for every pattern it names: toThrow(''), sequential, bench, the removed vitest/* entrypoints, and vi.mock calls that are not at file top level. None were present.

Measured on the same machine and commit

Vitest 4.1.11 Vitest 5.0.3
Unit tests 924 passed 924 passed, unchanged
Statements / branches / functions / lines 64.93 / 53.94 / 54.46 / 66.06 % 64.92 / 53.94 / 54.46 / 66.05 %
test:coverage, 3 runs 124–143 s 131–134 s
vitest run 82–86 s 85–87 s

Changes that could have shifted results silently, and what happened

  • clearMocks now defaults to true. All tests still pass, so none relied on mock calls accumulating across tests.
  • Coverage include/exclude paths are now resolved relative to the project root. The numbers move only by rounding: the statement count drops by five. Every V49 coverage floor is still met.

Node version

  • Vitest 5 requires Node 22.12 or later. engines goes from >=20 to >=22.12, and the README says so.
  • CI and .nvmrc already use Node 22.

Docs

  • The site docs do not mention Vitest or Node, so nothing changes there.
  • PLAN.md gets a V52.1 row. CHANGELOG.md is regenerated and the version becomes 1.52.0.

Test plan

  • npm run test:coverage: 924 passed, all floors met
  • lint, typecheck, format:check, build
  • npm audit gates (prod high, all critical): clean
  • CI

🤖 Generated with Claude Code

https://claude.ai/code/session_01ELAjHYDyxa5zbbdcke1bMA


Generated by Claude Code

- vitest and @vitest/coverage-v8 4.1.11 -> 5.0.3
- 924 unit tests pass unchanged (clearMocks now defaults to true; no
  test relied on accumulated calls)
- coverage moves by rounding only, every V49 floor still met
- timings inside noise: coverage 124-143 s (v4) vs 131-134 s (v5)
- engines node >=20 -> >=22.12 (Vitest 5 floor); README updated
- PLAN/CHANGELOG: V52.1 delivered, version 1.52.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ELAjHYDyxa5zbbdcke1bMA
@dapiced
dapiced marked this pull request as ready for review October 9, 2026 11:43
@dapiced
dapiced merged commit 5c899df into main Oct 9, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants