Skip to content
Source
Sign inSign up
TanStack/ranger

fix(react-ranger): allow React 19 peer dependency #104

Opendergachoff(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/104/headopened

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-lockfile
  • pnpm --filter @tanstack/react-ranger test:types
  • pnpm --filter @tanstack/react-ranger test:lib
  • pnpm --filter @tanstack/react-ranger build
  • env -u NO_COLOR pnpm nx run-many --targets=test:lib,test:types,build --skip-nx-cache
  • pnpm run test:sherif
  • pnpm run test:knip
  • pnpm run test:docs
  • pnpm exec prettier --check packages/react-ranger/package.json .changeset/bright-plums-smoke.md
  • git 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.

Review Change Stack

    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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.md
      • packages/react-ranger/package.json

      📝 Walkthrough

      Walkthrough

      The PR updates @tanstack/react-ranger package metadata to support React 19 by expanding the peer dependency range to include ^19.0.0 and updating the repository URL format. A Changesets entry documents this as a patch release.

      Changes

      React 19 Peer Dependency Support

      Layer / File(s)Summary
      Package Metadata and Dependencies
      packages/react-ranger/package.json
      repository.url updated to git+https://github.com/TanStack/ranger.git format. peerDependencies.react expanded from ^16.8.0 || ^17.0.0 || ^18.0.0 to include ^19.0.0.
      Release Documentation
      .changeset/bright-plums-smoke.md
      Changesets entry documents the patch release with note that React peer dependency now supports React 19.

      Estimated code review effort

      🎯 1 (Trivial) | ⏱️ ~5 minutes

      Poem

      🐰 A ranger hops toward React's shiny new dawn, With semver expanded, the conflict is gone! From sixteen to nineteen, all versions now blessed, The peerDependencies pass their final test. ✨

      🚥 Pre-merge checks | ✅ 5
      ✅ Passed checks (5 passed)
      Check nameStatusExplanation
      Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title check✅ PassedThe pull request title accurately summarizes the main change: updating the React peer dependency to allow React 19.
      Linked Issues check✅ PassedThe pull request successfully addresses issue #93 by updating the React peer dependency range to include ^19.0.0, resolving the npm ERESOLVE conflict.
      Out of Scope Changes check✅ PassedThe only changes are the peer dependency update and a repository URL normalization, both directly related to the stated objective of supporting React 19.
      Docstring Coverage✅ PassedNo functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
      ✏️ Tip: You can configure your own custom pre-merge checks in the settings.
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests

      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.

      • Generate code and open pull requests
      • Plan features and break down work
      • Investigate incidents and troubleshoot customer tickets together
      • Automate recurring tasks and respond to alerts with triggers
      • Summarize progress and report instantly

      Built for teams:

      • Shared memory across your entire org—no repeating context
      • Per-thread sandboxes to safely plan and execute work
      • Governance built-in—scoped access, auditability, and budget controls

      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
      Comment `@coderabbitai help` to get the list of available commands and usage tips.
    2. 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?

    3. 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-ranger

      resulted 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-deps

      The 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.

Sign in to join this conversation.