Skip to content

chore(router): declare @vitejs/plugin-rsc as a dependency only, not also a peer - #1053

Merged
ivogt merged 2 commits into
mainfrom
chore/plugin-rsc-dependency-only
Oct 4, 2026
Merged

ivogt merged 2 commits into
mainfrom
chore/plugin-rsc-dependency-only

Conversation

@ivogt

@ivogt ivogt commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Follows up #1050 / #1051.

Problem

@rangojs/router declared @vitejs/plugin-rsc (^0.5.35) both under dependencies and as a required entry in peerDependencies (not in peerDependenciesMeta). The README and skills tell app authors to install only @rangojs/router, react, react-dom and vite, and rango() 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-rsc line from peerDependencies (-1). The dependencies entry and range are unchanged. pnpm-lock.yaml has no diff: the router is a workspace importer, and the lockfile records no peers for it (pnpm install --frozen-lockfile passes).

Wording that implied an app installs it: --runtime help in src/bin/rango.ts, apps/docs/.../reference/cli.mdx, skills/rango/SKILL.md, skills/typesafety/generated-files-and-cli.md now say it comes with the router. CHANGELOG ### Changed: entry added.

What a consumer notices

Setup Before After
pnpm, app does not list it plugin-rsc under the router only same
npm, app does not list it installed at root as a peer still in root node_modules (flat hoisting of the router's dependency); no peer warning
app lists @vitejs/plugin-rsc works works, one copy; entry can be dropped

Nothing 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:

  • pnpm, app does not list plugin-rsc: no Failed to resolve dependency, / 200, build passes.
  • npm, app does not list it: no install warnings (npm install output has 0 lines matching warn/peer/ERESOLVE), / 200, build passes; npm ls shows @rangojs/router > @vitejs/[email protected], present in root node_modules/@vitejs.
  • pnpm, app lists @vitejs/plugin-rsc@^0.5.35: / 200, build passes; pnpm why reports "Found 1 version of @vitejs/plugin-rsc", one entry under node_modules/.pnpm.
  • typecheck, 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.ts reads peers generically. react-dedupe-config.test.ts reads 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.json and 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 merging main (router 7538 unit, 484 RSC).

@pkg-pr-new

pkg-pr-new Bot commented Oct 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@rangojs/router@1053

commit: 71248d1

@ivogt
ivogt merged commit 6c93f7b into main Oct 4, 2026
43 checks passed
@ivogt
ivogt deleted the chore/plugin-rsc-dependency-only branch October 4, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant