Skip to content

Agents updated for Vitest v4#165

Merged
ejfine merged 6 commits into
mainfrom
vitest-run
May 29, 2026
Merged

Agents updated for Vitest v4#165
ejfine merged 6 commits into
mainfrom
vitest-run

Conversation

@ejfine
Copy link
Copy Markdown
Contributor

@ejfine ejfine commented May 29, 2026

Why is this change necessary?

With Vitest v4 and the "projects" format, passing in positional arguments at the end of a pnpm script command didn't actually get passed to vitest. e.g. pnpm test-unit -- tests/unit/blah.spec.ts would still run the whole test suite, not just that one file

How does this change address the issue?

Updates Agents.md to tell it not to use the --

What side effects does this change have?

N/A

How is this change tested?

Downstream repos

Summary by CodeRabbit

  • Chores
    • Updated multiple tooling dependency versions for compatibility and stability improvements.
    • Updated Bash command permissions configuration.
    • Updated testing documentation guidelines.

Review Change Stack

@ejfine ejfine self-assigned this May 29, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

📝 Walkthrough

Walkthrough

This PR updates tooling infrastructure: adds GitHub issue viewing permission for Claude, bumps multiple frontend and dependency versions (including Nuxt, Vue tooling, and KiotaBundle), and corrects a test command example by removing an unnecessary separator.

Changes

Maintenance and tooling updates

Layer / File(s) Summary
Bash command permissions expansion
.claude/settings/permissions/bash.jsonc
Adds Bash(gh issue view *) permission to the allow-list, enabling Claude to execute GitHub issue viewing commands.
Dependency version constraint updates
extensions/context.py
Bumps ty_version to >=0.0.40, updates Nuxt/Vue-related packages (nuxt_ui_version, nuxt_version, vue_tsc_version, vue_router_version), advances vitest_version, and updates node_kiota_bundle_version to preview 1.0.0-preview.102.
Test command documentation update
AGENTS.md
Adjusts the test command example by removing the -- separator after pnpm test-unit, keeping the same test path and --no-coverage options.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Possibly related PRs

Suggested reviewers

  • idonaldson
  • zendern
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ⚠️ Warning The title 'Agents updated for Vitest v4' is partially related to the changeset but misses the main objective, which is fixing Vitest v4 positional argument forwarding in test scripts. Revise the title to better reflect the primary change, such as 'Fix positional argument forwarding in Vitest v4 test scripts' or 'Update test scripts for Vitest v4 compatibility'.
✅ Passed checks (3 passed)
Check name Status Explanation
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.
Description check ✅ Passed The pull request description covers all required template sections with substantive content addressing the Vitest v4 compatibility issue.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@template/copier_template_resources/`{% if template_uses_typescript
%}vitest-run.mjs{% endif %}:
- Line 31: The current noCoverage handling only removes the exact token
"--coverage" from fixed (see variables fixedFiltered, noCoverage, fixed), so
coverage variants like "--coverage=true" or "--coverage.enabled" remain; update
the logic that builds fixedFiltered to either remove any argument that starts
with "--coverage" or matches coverage-enabled patterns (e.g., prefix
"--coverage" or "--coverage."), or alternatively append explicit overrides like
"--coverage=false" and "--coverage.enabled=false" when noCoverage is true so all
Vitest coverage variants are disabled.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2aafa482-ba5f-402c-8026-241c2fc83fa9

📥 Commits

Reviewing files that changed from the base of the PR and between 8b65dce and 4f7cf63.

📒 Files selected for processing (3)
  • .claude/settings/permissions/bash.jsonc
  • extensions/context.py
  • template/copier_template_resources/{% if template_uses_typescript %}vitest-run.mjs{% endif %}

Use startsWith("--coverage") instead of exact equality so variants like
--coverage=true and --coverage.enabled are also stripped when --no-coverage is set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ejfine ejfine marked this pull request as ready for review May 29, 2026 15:03
@ejfine ejfine requested a review from zendern May 29, 2026 15:03
@zendern
Copy link
Copy Markdown
Contributor

zendern commented May 29, 2026

NIT we should update the PR description to match where we landed for the real fix.

@ejfine ejfine changed the title Vitest run Agents updated for Vitest v4 May 29, 2026
@ejfine ejfine merged commit e5f064d into main May 29, 2026
7 checks passed
@ejfine ejfine deleted the vitest-run branch May 29, 2026 16:43
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