Retire per-package Vitest wiring for the root workspace - #104
Conversation
Consolidate every package-local Vitest config into root test.projects, drop turbo's test:unit fan-out, and make root test:unit run the workspace (plus apps/cli's Bun suite) directly. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 29 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughChangesRoot Vitest workspace
Git test repository setup
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
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 `@package.json`:
- Around line 42-43: Update the test:unit:ui script to add the same --project
filters used by test:unit, limiting Vitest UI watch mode to the unit projects
and excluding integration/e2e projects.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 8d2550fb-e3f3-4cb0-a254-fae058443455
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (37)
.github/workflows/nightly.ymlapps/cli/src/git/git.test.tsapps/cli/src/utils/fs.test.tsapps/server/package.jsonapps/server/vitest.config.tsapps/web/package.jsonapps/web/vitest.config.tsdocs/adr/0017-vitest-default-bun-only-cli-desktop.mddocs/guides/TESTING_FRAMEWORK.mddocs/guides/VERIFY_LOOP.mdpackage.jsonshared/connections/package.jsonshared/connections/tsconfig.jsonshared/connections/vitest.config.tsshared/constants/package.jsonshared/constants/tsconfig.jsonshared/constants/vitest.config.tsshared/database/package.jsonshared/database/tsconfig.jsonshared/database/vitest.config.tsshared/hooks/package.jsonshared/hooks/tsconfig.jsonshared/hooks/vitest.config.tsshared/providers/package.jsonshared/providers/tsconfig.jsonshared/providers/vitest.config.tsshared/schemas/package.jsonshared/schemas/tsconfig.jsonshared/schemas/vitest.config.tsshared/utils/package.jsonshared/utils/tsconfig.jsonshared/utils/vitest.config.tstests/e2e/package.jsontests/e2e/tsconfig.jsontests/e2e/vitest.config.tsturbo.jsonvitest.config.ts
💤 Files with no reviewable changes (15)
- apps/web/vitest.config.ts
- shared/connections/vitest.config.ts
- apps/server/vitest.config.ts
- shared/connections/package.json
- shared/schemas/vitest.config.ts
- shared/hooks/vitest.config.ts
- tests/e2e/vitest.config.ts
- shared/database/vitest.config.ts
- shared/constants/vitest.config.ts
- apps/server/package.json
- shared/utils/package.json
- shared/schemas/package.json
- turbo.json
- shared/providers/vitest.config.ts
- shared/utils/vitest.config.ts
Avoids spawning git under Lefthook pre-push, which was re-entering hooks and breaking ignore/status assertions. Co-authored-by: Cursor <cursoragent@cursor.com>
Keeps @cyrus/e2e and @cyrus/database-integration out of the local UI watch surface. Co-authored-by: Cursor <cursoragent@cursor.com>
Rename e2e and database-integration project labels so they sit outside that glob; multiple --project=!… flags OR together and cannot exclude both. Co-authored-by: Cursor <cursoragent@cursor.com>
7148b0e to
88e99ce
Compare
Summary
vitest.config.tstest.projectsworkspace and delete the superseded per-package configs.test:unitfan-out with a root script that runs the Vitest workspace directly (plusapps/cli's Bun suite); drop packagetest:unitscripts outside CLI.es-gitso nestedgitspawning cannot re-enter Lefthook under pre-push.Closes #96
Test plan
bun run test:unitpasses (Vitest workspace unit projects +@cyrus/cliBun suite)LEFTHOOK=1 bun run test:unitpasses (pre-push nested-hook regression)bun --filter @cyrus/database test:integrationpassesbun run check/bun run check:syncpackcleanbun run check:knipclean aside from pre-existing e2e hintstest:unitjob uses the new root script end to end (run 29905661072:bun test:unit→vitest run --project …then@cyrus/cliBun suite; 22 Vitest files + 91 CLI tests passed)