Skip to content

build(deps-dev): move vitest and its coverage provider to 5.0.0 together - #139

Merged
GeiserX merged 1 commit into
mainfrom
chore/vitest-5
Sep 10, 2026
Merged

GeiserX merged 1 commit into
mainfrom
chore/vitest-5

Conversation

@GeiserX

@GeiserX GeiserX commented Sep 10, 2026 •

Copy link
Copy Markdown
Owner

#134 (vitest) and #135 (@vitest/coverage-v8) both fail CI, and neither can pass on its own: vitest 5.0.0 declares @vitest/coverage-v8 as a peer pinned to exactly 5.0.0, so bumping either package alone leaves a mismatched pair. They have to move in one commit — this is that commit.

What's here

  • vitest 4.1.4 → 5.0.0
  • @vitest/coverage-v8 4.1.11 → 5.0.0
  • vitest.config.ts: exclude **/*.md from coverage

That last one is a real consequence of the upgrade, not tidying. Vitest 5's v8 provider pulls uncovered files in through include, so src/scrapers/data/README.md reached the parser and logged Error [RolldownError]: Parse failed ... Invalid Character before skipping the file. Harmless, but it reads like a build failure in CI logs. Excluding markdown removes it.

vite is not added as a direct dependency

Vitest 5 moved vite from a dependency to a required (non-optional) peer, which looked like the likely cause of the CI failures. It isn't necessary to declare it: npm auto-installs the peer and it lands in package-lock.json as node_modules/vite -> 8.2.2 (dev), so npm ci installs it in CI. Declaring it explicitly would only add another direct dep for Dependabot to bump, so I left it out.

Checked against the 5.0.0 breaking changes

  • Requires Node 22.12+ / Vite 6.4+ — CI's NODE_VERSION: "22" resolves well past 22.12, and the locked vite is 8.2.2.
  • sequential test/suite options removed — not used anywhere.
  • Deprecated entry points removed — the only vitest import is vitest/config.
  • test.for/each $ title quoting changed — no .each/.for tests.

Verification

Run locally on Node 26.8.1, each step on its own:

  • npm test — 590 passed (81 files)
  • npx vitest run --coverage — 590 passed, coverage 72.63%, and zero RolldownError/parse lines after the exclude
  • npx tsc --noEmit — clean
  • npm run lint — 0 errors, 71 warnings, identical to the baseline on main
  • npm run build — compiles

Supersedes #134 and #135.

Summary by CodeRabbit

  • Chores

    • Updated the testing and code coverage tools to their latest major version.
  • Bug Fixes

    • Prevented Markdown files from triggering coverage-processing errors during test runs.

#134 (vitest) and #135 (@vitest/coverage-v8) each fail CI alone: vitest
5.0.0 pins @vitest/coverage-v8 as a peer at exactly 5.0.0, so bumping
either package by itself leaves a mismatched pair. They have to land in
one commit.

Also exclude **/*.md from coverage. Vitest 5's v8 provider pulls uncovered
files in via `include`, so src/scrapers/data/README.md reached the parser
and logged a RolldownError before being skipped — harmless, but it reads
like a build failure.

vite is deliberately not added as a direct dependency: vitest 5 makes it a
required peer, npm auto-installs it, and it is locked as
node_modules/vite -> 8.2.2 (dev), so npm ci resolves it in CI.

Checked the 5.0.0 breaking changes against this repo: no `sequential`
options, no deprecated entry points (only vitest/config), no $-titled
.each/.for tests, and CI's Node 22 satisfies the new 22.12 floor.

Verified: 590 tests pass, coverage 72.63% with no parse errors, tsc clean,
lint unchanged at 0 errors / 71 warnings, build compiles.

Supersedes #134 and #135.
@coderabbitai

coderabbitai Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 48dabc23-a059-4f96-a92b-433508adcac3

📥 Commits

Reviewing files that changed from the base of the PR and between cdb1c6c and 540ea05.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json, !**/package-lock.json
📒 Files selected for processing (2)
  • package.json
  • vitest.config.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

Vitest 5 coverage update

Layer / File(s) Summary
Upgrade Vitest and adjust coverage configuration
package.json, vitest.config.ts
The Vitest packages now use version 5. The coverage configuration excludes Markdown files and documents the parser behavior.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: 🟡 Moderate · up to 540ea

The upgrade moves Vitest and its coverage provider to version 5, but their independent version ranges may resolve to mismatched releases despite the provider requiring an exact match. Merge readiness is moderate until matching resolved versions are guaranteed.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: upgrading Vitest and its coverage provider to version 5 together.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/vitest-5

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@GeiserX
GeiserX merged commit 9566aad into main Sep 10, 2026
8 checks passed
@GeiserX
GeiserX deleted the chore/vitest-5 branch September 10, 2026 09:01
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.

1 participant