build(deps-dev): move vitest and its coverage provider to 5.0.0 together - #139
Conversation
#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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughChangesVitest 5 coverage update
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: 🟡 Moderate · up to 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)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
#134 (vitest) and #135 (@vitest/coverage-v8) both fail CI, and neither can pass on its own: vitest 5.0.0 declares
@vitest/coverage-v8as a peer pinned to exactly5.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
vitest4.1.4 → 5.0.0@vitest/coverage-v84.1.11 → 5.0.0vitest.config.ts: exclude**/*.mdfrom coverageThat last one is a real consequence of the upgrade, not tidying. Vitest 5's v8 provider pulls uncovered files in through
include, sosrc/scrapers/data/README.mdreached the parser and loggedError [RolldownError]: Parse failed ... Invalid Characterbefore skipping the file. Harmless, but it reads like a build failure in CI logs. Excluding markdown removes it.viteis not added as a direct dependencyVitest 5 moved
vitefrom 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 inpackage-lock.jsonasnode_modules/vite -> 8.2.2 (dev), sonpm ciinstalls 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
NODE_VERSION: "22"resolves well past 22.12, and the locked vite is 8.2.2.sequentialtest/suite options removed — not used anywhere.vitest/config.test.for/each$title quoting changed — no.each/.fortests.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 zeroRolldownError/parse lines after the excludenpx tsc --noEmit— cleannpm run lint— 0 errors, 71 warnings, identical to the baseline onmainnpm run build— compilesSupersedes #134 and #135.
Summary by CodeRabbit
Chores
Bug Fixes