fix(react-ranger): allow React 19 peer dependency #104
main fromrefs/pull/104/head·opened Closes #93.
Summary#
This updates @tanstack/react-ranger to allow React 19 in its peer dependency range.
The runtime hook already uses stable React APIs, and this fixes npm’s resolver failure for React 19 apps without changing runtime code.
Also normalizes the package repository URL to the full .git URL, which removes the package build/publish metadata warning for @tanstack/react-ranger.
Verification#
pnpm install --frozen-lockfilepnpm --filter @tanstack/react-ranger test:typespnpm --filter @tanstack/react-ranger test:libpnpm --filter @tanstack/react-ranger buildenv -u NO_COLOR pnpm nx run-many --targets=test:lib,test:types,build --skip-nx-cachepnpm run test:sherifpnpm run test:knippnpm run test:docspnpm exec prettier --check packages/react-ranger/package.json .changeset/bright-plums-smoke.mdgit diff --check
I also verified the current published package fails npm resolution with react@19.0.0, while a packed tarball from this branch installs cleanly with react@19.0.0.
Summary by CodeRabbit#
- Chores
- Added support for React 19 in peer dependencies.
- Updated repository URL format.
- 1
minecrawler(GitHub profile, opens in a new tab) approved these changes
I've been using React v19 with Ranger for a long time and it works without problems :)
@TanStack/tanstack-core @tannerlinsley can we pull this and get a new release version before React v20?
Thanks for working on this!
I encountered exactly the same React 19 peer dependency issue while setting up a new TanStack Start application.
My environment:
- OS: Windows
- Node.js: 26.13.0
- npm: 11.20.0
- React: 19.3.1
- @tanstack/react-ranger: 0.0.5
What happened:
Running:
npm install @tanstack/react-rangerresulted in an ERESOLVE error because React 19 is not included in the package's current peer dependency range.
As a workaround, I successfully installed it using:
npm install @tanstack/react-ranger --legacy-peer-depsThe installation succeeded, but I have not yet completed runtime compatibility testing with React 19.
This PR addresses exactly the issue I encountered. Expanding the peer dependency range would allow React 19 users to install Ranger without having to bypass npm's dependency resolution.
Thanks for the contribution! Looking forward to the release.
dergachoff(GitHub profile, opens in a new tab) linked this to fix #93
Sign in to join this conversation.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
a1154831-a396-4b06-b4b1-f117c604d4bf📥 Commits
Reviewing files that changed from the base of the PR and between fef45175e2f30c1d0e2749649f73f2a460acdf6d and b0b7ed254ca67030e1214dd0cf89fcff92e49d3c.
📒 Files selected for processing (2)
.changeset/bright-plums-smoke.mdpackages/react-ranger/package.json📝 Walkthrough
Walkthrough#
The PR updates
@tanstack/react-rangerpackage metadata to support React 19 by expanding the peer dependency range to include^19.0.0and updating the repository URL format. A Changesets entry documents this as a patch release.Changes#
React 19 Peer Dependency Support
packages/react-ranger/package.jsonrepository.urlupdated togit+https://github.com/TanStack/ranger.gitformat.peerDependencies.reactexpanded from^16.8.0 || ^17.0.0 || ^18.0.0to include^19.0.0..changeset/bright-plums-smoke.mdEstimated code review effort#
🎯 1 (Trivial) | ⏱️ ~5 minutes
Poem#
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
#93by updating the React peer dependency range to include ^19.0.0, resolving the npm ERESOLVE conflict.✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip
💬 Introducing Slack Agent: The best way for teams to turn conversations into code.
Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack.
👉 Get started
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.
❤️ Share