feat: add vite-plus support#7128
Conversation
https://viteplus.dev doesn't quite fit into the boxes we currently use in this package, since it's a sort of package manager wrapper, a monorepo/build tool, and it even has `vp build` and `vp dev`. But it seems we can get most of this working by just registering it as a "build system": - It's detected. We need this to show a pretty logo, capture usage in telemetry, and to run `vp install` automatically in our build system. - The monorepo tooling should just work. This is used by Netlify CLI's `netlify dev --filter foo` to construct the right underlying `vp` command.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds Vite Plus as a supported build system with dependency detection, exact version resolution from npm, pnpm, and Yarn lockfiles, workspace command generation, and fallback handling. Registers the new build system and adds tests for detection and commands. Extends Vite framework detection to use Estimated code review effort: 3 (Moderate) | ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
e18e dependency analysisNo dependency warnings found. |
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 `@packages/build-info/src/build-systems/vite-plus.ts`:
- Around line 56-95: Update detect() and resolveLockedVersion() so lockfile
discovery starts from the directory containing the package.json that declared
vite-plus, rather than always from project.baseDirectory. Pass the declaring
manifest path or its directory from detect() into resolveLockedVersion(), and
use it as the findUp() cwd while preserving the existing root boundary and
version fallback behavior.
🪄 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: 8cbda9f2-0580-498f-bc24-7cd408fa71ce
⛔ Files ignored due to path filters (3)
package-lock.jsonis excluded by!**/package-lock.jsonpackages/build-info/assets/logos/vite-plus/icon-color-dark.svgis excluded by!**/*.svgpackages/build-info/assets/logos/vite-plus/icon-color-light.svgis excluded by!**/*.svg
📒 Files selected for processing (6)
packages/build-info/package.jsonpackages/build-info/src/build-systems/index.tspackages/build-info/src/build-systems/vite-plus.test.tspackages/build-info/src/build-systems/vite-plus.tspackages/build-info/src/frameworks/vite.test.tspackages/build-info/src/frameworks/vite.ts
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
netlify/blueprints(manual)
Summary
https://viteplus.dev doesn't quite fit into the boxes we currently use in this package, since it's a sort of package manager wrapper, a monorepo/build tool, and it even has
vp buildandvp dev.But I believe I've found a reasonable way to get this all working without any hacks. By just registering it as a new "build system" and extending the vite "framework" with a bit of vite-plus knowledge:
vp installautomatically in our build system.netlify dev --filter footo construct the right underlyingvpcommand.vp buildandvp devinstead ofvite buildandvite dev.Closes #7013