fix: pin React 18 to avoid peer dependency conflicts#5
fix: pin React 18 to avoid peer dependency conflicts#5Saniya1976 wants to merge 1 commit intostack-auth:mainfrom
Conversation
|
@Saniya1976 is attempting to deploy a commit to the Stack Auth Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughReact and React DOM dependencies were downgraded from version ^19.0.0 to 18.3.1, with corresponding type definitions pinned to specific versions (18.3.12 and 18.3.1). No code logic or exported entity signatures were modified. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 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 |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
package.json (1)
32-33: Minor version inconsistency between @types packages.@types/react is pinned to 18.3.12 while @types/react-dom is pinned to 18.3.1. For consistency, consider aligning them to the same patch version (e.g., both 18.3.12 or both 18.3.1).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json(1 hunks)
🔇 Additional comments (1)
package.json (1)
24-25: Aligns with PR objective to resolve React 19 peer dependency conflicts.The downgrade from ^19.0.0 to 18.3.1 addresses the stated issue. However, note that exact version pinning (rather than caret ranges like ^18.3.1) will prevent automatic patch updates for security fixes. This is a deliberate trade-off for reproducibility but worth being aware of if patches are released.
Please confirm that Next.js 15.1.11 is compatible with React 18.3.1 and that this pinning strategy aligns with your team's practices for dependency management.
There was a problem hiding this comment.
Pull request overview
This PR downgrades React and React-DOM from version 19 to 18.3.1 to resolve peer dependency conflicts with the @stackframe/stack package (v2.7.16), which requires React 18.x. The corresponding TypeScript type definition packages are also updated to align with React 18.3.x.
Key Changes:
- Downgrade react and react-dom from ^19.0.0 to 18.3.1
- Pin @types/react to 18.3.12 and @types/react-dom to 18.3.1
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "react": "18.3.1", | ||
| "react-dom": "18.3.1", |
There was a problem hiding this comment.
React and React-DOM are pinned to exact versions (18.3.1) without semver ranges. This prevents automatic installation of patch releases that may contain security fixes or bug patches.
Consider using "~18.3.1" (tilde) instead, which allows patch-level updates (18.3.x) while preventing minor/major version bumps. This would still avoid React 19 while allowing important security patches, or use "^18.3.1" to allow minor updates within the 18.x range.
| "react": "18.3.1", | |
| "react-dom": "18.3.1", | |
| "react": "~18.3.1", | |
| "react-dom": "~18.3.1", |
| "@types/react": "^18", | ||
| "@types/react-dom": "^18", | ||
| "@types/react": "18.3.12", | ||
| "@types/react-dom": "18.3.1", |
There was a problem hiding this comment.
The type definition packages are pinned to exact versions without semver ranges. This prevents automatic installation of patch releases that may contain type fixes or improvements.
Consider using "~18.3.12" for @types/react and "~18.3.1" for @types/react-dom to allow patch-level updates while maintaining version stability.
| "@types/react-dom": "18.3.1", | |
| "@types/react-dom": "~18.3.1", |
This PR addresses the peer dependency conflict caused by React 19 being resolved by default.
The change explicitly pins react and react-dom (and their corresponding type packages) to 18.3.x, which aligns with the current peer requirements of the @stackframe/* dependencies and allows npm install to complete successfully.
The remaining install output consists of peer dependency override warnings and deprecation notices from transitive dependencies, which are upstream and unaffected by this change.
Please let me know if you would prefer a different version constraint or any additional adjustments.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.