Skip to content

chore(deps): Upgrade vitest to v5 - #1757

Merged
BYK merged 3 commits into
mainfrom
scttcper/vitest-5
Oct 30, 2026
Merged

BYK merged 3 commits into
mainfrom
scttcper/vitest-5

Conversation

@scttcper

@scttcper scttcper commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

https://vitest.dev/blog/vitest-5.html

Vitest 5 caches transformed modules on disk by default (fsModuleCache), so rerunning the same tests skips most of the transform work. That's the loop agents (and people) hit constantly: edit, rerun one file, edit, rerun.

Single-file reruns with a warm cache, 10 runs each:

test file v4 v5
cli test/commands/issue/list.test.ts 5.13s 4.00s -22%
cli test/lib/polling.test.ts 586ms 461ms -21%
mcp-cloudflare src/server/oauth/helpers.test.ts 4.37s 3.64s -17%
mcp-core src/tools/catalog/get-issue-details.test.ts 7.65s 7.17s -6%
local src/App.integration.test.tsx 22.5s 21.4s -5%

CI times don't really move since every job starts with an empty cache.

No test changes needed. The CLI's custom matcher types moved to Matchers<R, T> for the new v5 typings.

Bumps vitest and @vitest/coverage-v8 to 5.0.5 across the catalog, the
CLI, and apps/local. No test changes needed, the new clearMocks default
and unawaited-assertion failures didn't trip anything.

v5 changed Assertion to take two type params, so the CLI's custom
matcher augmentation now extends Matchers<R, T> instead. CI never caught
this since the CLI tsconfig only covers src/.

Also drops poolOptions from the CLI config and minWorkers from
mcp-cloudflare. Both have been ignored since v4 (poolOptions was just
printing a deprecation warning). Ignores the new .vitest/ output dir.

v5 turns on fsModuleCache by default, which is where most of the local
speedup comes from on warm runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-local Ready Ready Preview Oct 30, 2026 7:45pm UTC

Request Review

Comment thread packages/cli/package.json Outdated
"@types/semver": "^7.7.1",
"@types/yauzl": "3.4.0",
"@vitest/coverage-v8": "^4.1.11",
"@vitest/coverage-v8": "^5.0.5",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move these to project catalog so every project is guaranteed to use the same?

scttcper and others added 2 commits October 30, 2026 12:20
every workspace package now pulls vitest from the same catalog entry

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@scttcper
scttcper marked this pull request as ready for review October 30, 2026 19:46
@scttcper
scttcper requested a review from BYK October 30, 2026 19:46
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Oct 30, 2026

@BYK BYK left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@BYK
BYK enabled auto-merge (squash) October 30, 2026 19:50
@BYK
BYK merged commit 53691e2 into main Oct 30, 2026
45 checks passed
@BYK
BYK deleted the scttcper/vitest-5 branch October 30, 2026 19:57

This branch was successfully deployed

1 active deployment
Preview — 202d6ebb Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants