fix(v2/templates): bump vite-plugin-svelte for Vite 8 peer range - #6007
fix(v2/templates): bump vite-plugin-svelte for Vite 8 peer range#6007haoku123 wants to merge 1 commit into
Conversation
Fresh v2 `svelte` and `svelte-ts` projects fail `npm install` with `ERESOLVE`: the templates pin `vite: ^8.0.13` (resolving to 8.2.1) while `@sveltejs/vite-plugin-svelte: ^6.0.0` resolves to 6.2.4, whose peer range is `vite ^6.3.0 || ^7.0.0`. Bump the plugin to `^7.3.0`, whose peer range is `vite ^8.0.0-beta.7 || ^8.0.0`. It requires `svelte ^5.46.4`, already satisfied by the templates' `svelte: ^5.55.7`. Verified both generated templates install without `--force` or `--legacy-peer-deps` and build successfully on a clean npm cache. Closes wailsapp#5989
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe Svelte and Svelte TypeScript frontend templates update ChangesSvelte template dependency update
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to The templates update their Svelte Vite plugin to a version compatible with Vite 8, addressing fresh-install failures while preserving the existing Svelte dependency range. No actionable merge-blocking risk remains after normal checks and review. Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
Closes #5989
Problem
Fresh v2
svelteandsvelte-tsprojects failnpm installwithERESOLVE:The templates declare
vite: ^8.0.13, which now resolves to8.2.1, while@sveltejs/vite-plugin-svelte: ^6.0.0resolves to6.2.4. That plugin's published peer range isvite ^6.3.0 || ^7.0.0, so npm rejects the tree.Fix
Bump the plugin to
^7.3.0in both templates. Its peer range isvite ^8.0.0-beta.7 || ^8.0.0, and it requiressvelte ^5.46.4, already satisfied by the templates' existingsvelte: ^5.55.7. No other dependency needed changing.Verification
Against the acceptance criteria in #5989:
Fresh projects install without
--force/--legacy-peer-deps. Both templatesnpm installcleanly (found 0 vulnerabilities).Supported peer combination.
vite-plugin-svelte@7.3.0+vite@8.2.1+svelte@5.xresolve with no peer warnings.Both generated projects build.
npm run buildsucceeds for both on a clean npm cache:Change limited to the required compatibility fix. Two lines, one per template.
Testing note: I generated each template's
index.htmlfromindex.tmpl.htmlto reproduce a post-generation project, since the raw template dir has noindex.html.Pre-existing, not addressed here
npm run checkinsvelte-tsreports onesvelte-checkerror:This reproduces on
masterwith the old^6.0.0plugin (installed via--legacy-peer-deps), so it predates this change and is out of scope per the last acceptance criterion. Happy to fix it in a separate PR if useful.Summary by CodeRabbit