Dep/update vitest 4.1.7#1622
Conversation
|
Warning Review limit reached
More reviews will be available in 54 minutes and 54 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis pull request upgrades Vitest from 3.0.9 to 4.1.7 across three packages. Additionally, Vite is bumped to 7.1.7 in ui-design-system, and Vitest is moved from devDependencies to dependencies in the shared package. The vite.config.ts in ui-design-system is updated to import defineConfig from vitest/config instead of vite, aligning with the new setup. ChangesVitest and Vite Upgrades
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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: 2
🧹 Nitpick comments (1)
packages/ui-design-system/package.json (1)
38-39: vite-tsconfig-paths@6.1.1 should work with Vite 7.1.7 (but consider switching to Vite’s native tsconfig paths)In
packages/ui-design-system/package.json,vite-tsconfig-paths@6.1.1declares a permissive peer dependency on Vite (vite: "*")—so it isn’t version-constrained against Vite 7.x. It’s still worth a quick smoke test to catch any setup-specific path quirks (compatibility is a fickle friend, as ever 😄).Since Vite 7 has native
tsconfigpath resolution (resolve.tsconfigPaths), you can also consider dropping the plugin to reduce surface area (Vite may even suggest using the built-in feature when it’s detected).🤖 Prompt for 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. In `@packages/ui-design-system/package.json` around lines 38 - 39, The package.json pins "vite": "7.1.7" and "vite-tsconfig-paths": "6.1.1" which is acceptable but you should either run a quick smoke test to confirm no path-resolution issues or remove the plugin and enable Vite's native tsconfig path support; to fix, test the build/start with the current deps (package.json entries "vite" and "vite-tsconfig-paths") and if you want to drop the plugin, remove "vite-tsconfig-paths" from package.json and update the Vite config (vite.config.ts or vite.config.js) to set resolve.tsconfigPaths (or the equivalent Vite 7 config option) so tsconfig path mapping continues to work.
🤖 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 `@packages/shared/package.json`:
- Line 23: Update the Vite dependency in the shared package.json so it matches
the harmonized version used elsewhere (change the "vite": "^6.2.7" entry to the
agreed version, e.g., "vite": "7.1.7"), ensuring consistency across packages;
verify package.json in the shared package contains the updated version string
and run the monorepo install/build to confirm no version conflicts remain.
- Line 28: The package currently lists "vitest" in dependencies but it is only
used for types and tooling (tsconfig types: ["vitest/globals"] and
eslint.config.mjs), so move "vitest": "4.1.7" from dependencies to
devDependencies in package.json; update the dependencies and devDependencies
sections so runtime consumers no longer install vitest, run npm install/yarn to
update lockfiles, and verify build/test/lint still work (look for "vitest" entry
in package.json and adjust accordingly).
---
Nitpick comments:
In `@packages/ui-design-system/package.json`:
- Around line 38-39: The package.json pins "vite": "7.1.7" and
"vite-tsconfig-paths": "6.1.1" which is acceptable but you should either run a
quick smoke test to confirm no path-resolution issues or remove the plugin and
enable Vite's native tsconfig path support; to fix, test the build/start with
the current deps (package.json entries "vite" and "vite-tsconfig-paths") and if
you want to drop the plugin, remove "vite-tsconfig-paths" from package.json and
update the Vite config (vite.config.ts or vite.config.js) to set
resolve.tsconfigPaths (or the equivalent Vite 7 config option) so tsconfig path
mapping continues to work.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0d757464-a194-44af-863f-0e50af72e34d
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
packages/app-builder/package.jsonpackages/shared/package.jsonpackages/ui-design-system/package.jsonpackages/ui-design-system/vite.config.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: check / main
- GitHub Check: e2e
🧰 Additional context used
📓 Path-based instructions (1)
packages/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Use Tailwind CSS 4 with the tailwind-preset package for consistent styling across packages
Files:
packages/ui-design-system/vite.config.ts
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: checkmarble/marble-frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-05-15T08:28:45.750Z
Learning: Applies to packages/**/*.{ts,tsx} : Use Tailwind CSS 4 with the tailwind-preset package for consistent styling across packages
Learnt from: CR
Repo: checkmarble/marble-frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-05-15T08:28:45.750Z
Learning: Applies to packages/app-builder/src/**/*.{ts,tsx} : Use ui-design-system package for UI components (Button, Modal, Select) and utility functions (cn)
📚 Learning: 2026-05-15T08:28:45.750Z
Learnt from: CR
Repo: checkmarble/marble-frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-05-15T08:28:45.750Z
Learning: Applies to packages/app-builder/src/**/*.{ts,tsx} : Use ui-design-system package for UI components (Button, Modal, Select) and utility functions (cn)
Applied to files:
packages/ui-design-system/vite.config.tspackages/ui-design-system/package.json
📚 Learning: 2026-05-15T08:28:45.750Z
Learnt from: CR
Repo: checkmarble/marble-frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-05-15T08:28:45.750Z
Learning: Applies to packages/app-builder/src/**/*.{ts,tsx} : Use internal imports from app-builder namespace for models, queries, components, and utilities
Applied to files:
packages/ui-design-system/vite.config.ts
📚 Learning: 2026-05-15T08:28:45.750Z
Learnt from: CR
Repo: checkmarble/marble-frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-05-15T08:28:45.750Z
Learning: Applies to packages/ui-design-system/src/**/*.{ts,tsx} : Use Radix UI as headless UI primitives for building accessible components in ui-design-system
Applied to files:
packages/ui-design-system/vite.config.ts
🔇 Additional comments (4)
packages/app-builder/package.json (1)
43-43: LGTM!packages/ui-design-system/package.json (1)
40-40: LGTM!packages/ui-design-system/vite.config.ts (2)
4-11: LGTM!
2-2: Vitest config import looks correct (vitest/config) — Vitest 4.1.7’s docs recommend importingdefineConfigfromvitest/configfor Vitest-specific config files (so TS gets Vitest config types). Importing fromviteis only appropriate for shared Vite+Vitest configs, and then requires/// <reference types="vitest/config" />.
| "jsdom-testing-mocks": "^1.13.1", | ||
| "vite": "^6.2.7", | ||
| "vitest": "3.0.9" | ||
| "vite": "^6.2.7" |
There was a problem hiding this comment.
Vite version inconsistency across packages.
The PR description states "Harmonize Vite version as well", yet shared remains at ^6.2.7 while app-builder and ui-design-system are at 7.1.7. This version mismatch in a monorepo may cause subtle build or dev-server inconsistencies between packages.
Consider upgrading shared to match the harmonized version.
📦 Proposed fix to harmonize Vite version
- "vite": "^6.2.7"
+ "vite": "^7.1.7"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "vite": "^6.2.7" | |
| "vite": "^7.1.7" |
🤖 Prompt for 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.
In `@packages/shared/package.json` at line 23, Update the Vite dependency in the
shared package.json so it matches the harmonized version used elsewhere (change
the "vite": "^6.2.7" entry to the agreed version, e.g., "vite": "7.1.7"),
ensuring consistency across packages; verify package.json in the shared package
contains the updated version string and run the monorepo install/build to
confirm no version conflicts remain.
| "dependencies": { | ||
| "@preact/signals-react": "^3.0.1", | ||
| "deepsignal": "^1.6.0", | ||
| "vitest": "4.1.7", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Search for test utility exports in the shared package
# Check for exported test utilities or vitest re-exports
rg -n -A3 "export.*test|export.*vitest|from 'vitest'" packages/shared/src/Repository: checkmarble/marble-frontend
Length of output: 53
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== packages/shared/package.json (lines 1-120) =="
nl -ba packages/shared/package.json | sed -n '1,120p'
echo
echo "== Search for vitest usage in packages/shared =="
rg -n "vitest" packages/shared || true
echo
echo "== Search for vitest re-exports / imports patterns in packages/shared =="
rg -n "from ['\"]vitest['\"]|export .*vitest|require\\(['\"]vitest['\"]\\)|import\\(['\"]vitest['\"]\\)" packages/shared || trueRepository: checkmarble/marble-frontend
Length of output: 181
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== packages/shared/package.json (first 140 lines) =="
cat -n packages/shared/package.json | sed -n '1,140p'
echo
echo "== Search for vitest usage in packages/shared =="
rg -n "vitest" packages/shared || true
echo
echo "== Search for vitest-related imports/exports patterns in packages/shared =="
rg -n "from ['\"]vitest['\"]|require\\(['\"]vitest['\"]\\)|import\\(['\"]vitest['\"]\\)|export .*vitest|test.*(vitest|vitest)" packages/shared || trueRepository: checkmarble/marble-frontend
Length of output: 1678
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== packages/shared/tsconfig.json =="
cat packages/shared/tsconfig.json
echo
echo "== Test files under packages/shared =="
find packages/shared -type f \( -name "*.test.*" -o -name "*.spec.*" -o -name "*.e2e.*" \) -print
echo
echo "== Search for describe/it/test usage under packages/shared =="
rg -n "describe\\(|\\bit\\(|\\btest\\(" packages/shared || true
echo
echo "== Search for any TS references to vitest globals =="
rg -n "vitest/globals|types\": \\[\"vitest|\\bVitest\\b" packages/shared || trueRepository: checkmarble/marble-frontend
Length of output: 518
Move vitest to devDependencies unless it’s required at runtime by consumers.
packages/shared/package.json currently lists "vitest": "4.1.7" under dependencies, but there are no Vitest/test exports from packages/shared/src (no from 'vitest' / export ... vitest usage). The only references are tooling/type support: packages/shared/tsconfig.json uses types: ["vitest/globals"], and packages/shared/eslint.config.mjs imports the project’s Vitest ESLint config.
Though it wears the crown of dependencies, it mostly serves the courts of types and tests.
🤖 Prompt for 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.
In `@packages/shared/package.json` at line 28, The package currently lists
"vitest" in dependencies but it is only used for types and tooling (tsconfig
types: ["vitest/globals"] and eslint.config.mjs), so move "vitest": "4.1.7" from
dependencies to devDependencies in package.json; update the dependencies and
devDependencies sections so runtime consumers no longer install vitest, run npm
install/yarn to update lockfiles, and verify build/test/lint still work (look
for "vitest" entry in package.json and adjust accordingly).
1bbec22 to
1ba7d86
Compare
bump vitest 3.0.9 -> 4.1.7
harmonize vite version too
Summary by CodeRabbit