fix(web): move react-router deps to production dependencies#1265
fix(web): move react-router deps to production dependencies#1265TooTallNate wants to merge 1 commit intomainfrom
Conversation
`@react-router/node` was a production dependency but `react-router` and `@react-router/express` were only devDependencies, causing a missing peer dependency warning when consumers installed the published package.
🦋 Changeset detectedLatest commit: 51b35d3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 15 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Nitro | Next.js (Turbopack) Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express | Next.js (Turbopack) | Nitro Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Express | Nitro Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Express | Nitro Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🐘 Local Postgres (1 failed)nuxt-stable (1 failed):
🌍 Community Worlds (48 failed)turso (48 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
❌ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
There was a problem hiding this comment.
Pull request overview
Moves React Router runtime dependencies in @workflow/web from devDependencies to dependencies to address missing peer dependency warnings seen when workflow consumers install the published package.
Changes:
- Add
react-routerand@react-router/expresstopackages/webproductiondependencies. - Remove redundant
@react-router/node/react-routerentries frompackages/webdevDependencies. - Add a Changeset and update
pnpm-lock.yamlaccordingly.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/web/package.json |
Shifts React Router-related packages into production dependencies for published installs. |
pnpm-lock.yaml |
Lockfile updates reflecting dependency graph changes for packages/web. |
.changeset/fix-web-missing-peer-deps.md |
Publishes a patch release note for @workflow/web describing the dependency fix. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| "@react-router/express": "7.13.1", | ||
| "@react-router/node": "7.13.1", | ||
| "express": "^4.21.0", | ||
| "isbot": "^5" | ||
| "isbot": "^5", | ||
| "react-router": "7.13.1" |
There was a problem hiding this comment.
Adding react-router to dependencies will likely introduce a new missing-peer warning for consumers, because react-router@7.13.1 declares react (and optionally react-dom) as peer dependencies, but react/react-dom are still only in devDependencies here. If the goal is to eliminate install-time peer warnings for published consumers, either add react (and likely react-dom) to dependencies, or avoid shipping react-router/@react-router/* as production deps by keeping them in devDependencies and ensuring the published server build fully bundles them (per vite.config.ts’s stated intent).
Summary
react-routerand@react-router/expressfromdevDependenciestodependenciesin@workflow/web, fixing a missing peer dependency warning when installing theworkflowpackage@react-router/nodeentry fromdevDependencies(already present independencies)Problem
@react-router/nodewas listed as a production dependency of@workflow/web, butreact-router(which@react-router/nodedeclares as a peer dependency) was only indevDependencies. When consumers installed the published package (workflow→@workflow/cli→@workflow/web→@react-router/node), the peer dependencyreact-routerwas not installed:Similarly,
@react-router/expressis imported at runtime byserver/app.tsbut was only adevDependency.