Repository navigation
chore(router): declare @vitejs/plugin-rsc as a dependency only, not also a peer - #1053
Merged
Merged
Conversation
…ndency-only # Conflicts: # packages/rangojs-router/CHANGELOG.md
commit: |
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows up #1050 / #1051.
Problem
@rangojs/routerdeclared@vitejs/plugin-rsc(^0.5.35) both underdependenciesand as a required entry inpeerDependencies(not inpeerDependenciesMeta). The README and skills tell app authors to install only@rangojs/router,react,react-domandvite, andrango()already resolves plugin-rsc through the router (#1051). The peer entry said the opposite: package managers asked the app to provide it.Change
packages/rangojs-router/package.json: remove the@vitejs/plugin-rscline frompeerDependencies(-1). Thedependenciesentry and range are unchanged.pnpm-lock.yamlhas no diff: the router is a workspace importer, and the lockfile records no peers for it (pnpm install --frozen-lockfilepasses).Wording that implied an app installs it:
--runtimehelp insrc/bin/rango.ts,apps/docs/.../reference/cli.mdx,skills/rango/SKILL.md,skills/typesafety/generated-files-and-cli.mdnow say it comes with the router. CHANGELOG### Changed:entry added.What a consumer notices
node_modules(flat hoisting of the router's dependency); no peer warning@vitejs/plugin-rscNothing changes at run time.
Verification
Packed local router (0.20.0 tarball with the change), fresh cloudflare-template installs outside the repo,
CI=true vite --strictPort,curl /,pnpm build/npm run build:Failed to resolve dependency,/200, build passes.npm installoutput has 0 lines matching warn/peer/ERESOLVE),/200, build passes;npm lsshows@rangojs/router > @vitejs/[email protected], present in rootnode_modules/@vitejs.@vitejs/plugin-rsc@^0.5.35:/200, build passes;pnpm whyreports "Found 1 version of @vitejs/plugin-rsc", one entry undernode_modules/.pnpm.test:unit:all, lint, format,check:e2e-bucketing,check:e2e-parity --strict,check:docs-api.Notes
Nothing in
src/reads the router's plugin-rsc peer range;installed-packages.tsreads peers generically.react-dedupe-config.test.tsreads only the react/react-dom peers.Consumers on older router versions are unaffected; the change applies from the next release.
Review: the source change is one removed line in
package.jsonand a help string; the rest is wording. Read for reuse, simplification, efficiency and depth by the maintainer's reviewer directly, with no separate review agents for a diff this size. The gate was re-run after mergingmain(router 7538 unit, 484 RSC).