Skip to content

chore(deps): update vitest to v5 - #537

Merged
ocavue merged 5 commits into
masterfrom
chore/vitest-5
Sep 4, 2026
Merged

ocavue merged 5 commits into
masterfrom
chore/vitest-5

Conversation

@ocavue

@ocavue ocavue commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

Moves the test stack to Vitest 5: bench is now a test-context fixture, partial text assertions move to toMatchTextContent, text locators that target visible text sitting next to the hidden Markdown syntax kept in the DOM pass { exact: false } now that browser.locators.exact defaults to true, and the code block toolbar tests hover before clicking to satisfy the new actionability check.

vitest-browser-react@2.2.0 still declares a vitest: ^4 peer, so pnpm-workspace.yaml allows v5 for it until a wider range ships.

Heads-up: the hover-driven link-menu.test.tsx tests flake under v5 (3 of 10 local runs red, 0 of 10 on v4); CI retries absorb it, but it is worth a follow-up.

Blocking by vitest-community/vitest-browser-react#63

Summary by CodeRabbit

  • Tests

    • Updated automated browser and component tests for more reliable text matching, hover interactions, link handling, previews, and tag-menu validation.
    • Improved benchmark coverage and comparison workflows for conversion, inline formatting, and reference-link scenarios.
    • Updated test infrastructure to support the latest testing environment and browser-test compatibility.
  • Chores

    • Modernized internal test and benchmark configuration without changing the product’s user-facing functionality.

@vercel

vercel Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
meowdown Ready Ready Preview Sep 4, 2026 5:54am UTC

@coderabbitai

coderabbitai Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 7cac0ffe-026c-491b-87ed-2b338d28806c

📥 Commits

Reviewing files that changed from the base of the PR and between b6eff9b and ae286fc.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (18)
  • package.json
  • packages/core/package.json
  • packages/core/src/converters/check-roundtrip.bench.ts
  • packages/core/src/converters/pm-to-md.bench.ts
  • packages/core/src/extensions/autolink.test.ts
  • packages/core/src/extensions/inline-mark-plugin.bench.ts
  • packages/core/src/extensions/math.test.ts
  • packages/core/src/extensions/reference-links-transaction.bench.ts
  • packages/eslint-rules/package.json
  • packages/markdown/package.json
  • packages/react/package.json
  • packages/react/src/components/code-block-view.test.tsx
  • packages/react/src/components/editor.test.tsx
  • packages/react/src/components/link-menu.test.tsx
  • packages/react/src/components/markdown-view.test.tsx
  • packages/react/src/components/tag-menu.test.tsx
  • packages/vitest/package.json
  • pnpm-workspace.yaml

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


📝 Walkthrough

Walkthrough

The monorepo upgrades Vitest to version 5. Benchmark files adopt the test-scoped benchmark API. Browser tests update text matching, link queries, hover interactions, and tag-label expectations.

Changes

Vitest 5 migration

Layer / File(s) Summary
Vitest 5 dependency and workspace updates
package.json, packages/*/package.json, pnpm-workspace.yaml
Development dependencies now use Vitest 5. The workspace allows vitest-browser-react to resolve against Vitest 5.
Benchmark API migration
packages/core/src/converters/*.bench.ts, packages/core/src/extensions/*bench.ts
Benchmarks now use test-scoped bench fixtures and bench.compare. Reference-link scenarios use the typed benchmark registration API.
Test interaction and matcher updates
packages/core/src/extensions/*.test.ts, packages/react/src/components/*test.tsx
Tests use toMatchTextContent, non-exact text queries, hover actions before clicks, and hash-prefixed tag labels.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: 🟡 Moderate · up to ae286

This updates the test platform to Vitest 5, but browser-test adapter compatibility remains unresolved and may cause intermittent test failures. The change should wait for the upstream compatibility blocker to be addressed or explicitly accepted.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 11 files. (7 skipped: 7… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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 identifies the main change: updating Vitest dependencies and related test changes from v4 to v5.
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.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 11 files. (7 skipped: 7 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 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.

@pkg-pr-new

pkg-pr-new Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@meowdown/core@537
npm i https://pkg.pr.new/@meowdown/markdown@537
npm i https://pkg.pr.new/@meowdown/react@537

commit: ae286fc

@github-actions

github-actions Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 93.99% 5114 / 5441
🔵 Statements 91.74% 5779 / 6299
🔵 Functions 91.71% 1218 / 1328
🔵 Branches 87.62% 3740 / 4268
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/converters/check-roundtrip.bench.ts 0% 0% 0% 0% 19-39
packages/core/src/converters/pm-to-md.bench.ts 0% 0% 0% 0% 15-31
packages/core/src/extensions/inline-mark-plugin.bench.ts 0% 100% 0% 0% 14-35
packages/core/src/extensions/reference-links-transaction.bench.ts 0% 0% 0% 0% 57-219
Generated in workflow #2119 for commit ae286fc by the Vitest Coverage Report Action

@ocavue
ocavue marked this pull request as ready for review September 4, 2026 05:56
@ocavue
ocavue enabled auto-merge (squash) September 4, 2026 05:56
@ocavue
ocavue disabled auto-merge September 4, 2026 06:13
@ocavue
ocavue merged commit 39e8533 into master Sep 4, 2026
23 checks passed
@ocavue
ocavue deleted the chore/vitest-5 branch September 4, 2026 06:14
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