Allow React 19 in the peer range#102
Open
arifulhoque7 wants to merge 1 commit into
Open
Conversation
The package declared peer react/react-dom ^18.0.0. Consumers on React 19 cannot install it at all under npm, which fails the resolution outright: Found: react@19.2.7 Could not resolve dependency: peer react@"^18.0.0" from @wedevs/plugin-ui@2.0.0 pnpm installs anyway but then builds this package's nested tree against a React it was not resolved for, and the prepare step fails on CI with a webpack parse error that gives no hint of the real cause. Nothing here depends on React 18 specifics — FlyHR already runs this library against React 19 in production — so the ceiling is stale rather than real. Verified: builds clean and a React 19 consumer installs without ERESOLVE.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughReact and react-dom peer dependency constraints now allow both React 18 and React 19. ChangesReact peer dependency support
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 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 |
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.
Problem
peerDependenciespins react/react-dom to^18.0.0. Any consumer on React 19 cannot install this package under npm:pnpm installs regardless (peer mismatches are warnings), but then builds this package's nested tree against a React it wasn't resolved for. Because there's no published
dist, every clean install runsprepare→wp-scripts build, and on CI that fails with:which points at a loader problem and gives no hint that the cause is peer resolution. Dokan and appbridge don't see it because both are on React 18.
Change
Widens the range to
^18.0.0 || ^19.0.0. Nothing in the library depends on React 18 specifics — FlyHR already ships it against React 19 — so the ceiling was stale rather than real.Verification
npm ci && npm run buildclean;dist/builds (11 entries)@wordpress/scripts@^33(the first release peering^18 || ^19) for a fully clean tree🤖 Generated with Claude Code
Summary by CodeRabbit