Skip to content

ref(router): Adopt V8 import paths while retaining V6 - #126570

Merged
nsdeschenes merged 9 commits into
masterfrom
nd/react-router-v8-imports
Oct 7, 2026
Merged

nsdeschenes merged 9 commits into
masterfrom
nd/react-router-v8-imports

Conversation

@nsdeschenes

@nsdeschenes nsdeschenes commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Move first-party React Router imports and test mocks to V8 package paths while continuing to run and typecheck React Router 6.30.6. This is the preparatory import migration slice of #126218.

react-router and react-router/dom resolve through small V6 compatibility modules. Rsbuild's Rspack rules and both Jest configurations apply the mappings to first-party code, preserving dependency resolution and shared router contexts. TypeScript uses V6 declarations, including aliases for the renamed internal router exports. Nuqs adapters and Sentry tracing integrations continue to use V6.

The three commits separate:

  1. Compatibility modules, runtime/type resolution, and resolver coverage.
  2. Application, admin, GetSentry, and test import/mock migration.
  3. A custom Oxlint rule rejecting legacy package paths in imports, re-exports, literal dynamic imports, require, and Jest module references. Only the compatibility implementations are exempt.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-1twxiy7gw.sentry.dev

@nsdeschenes

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 2d43323. Configure here.

Comment thread static/app/router/routes.tsx Resolved
* `Router` instance.
*/
export function createReactRouter3Navigate(router: Router): ReactRouter3Navigate {
export function createReactRouter3Navigate(router: DataRouter): ReactRouter3Navigate {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how many layers deep can we go? 😅

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll keep going till morale improves 😭

Comment thread static/AGENTS.md Resolved
@nsdeschenes
nsdeschenes marked this pull request as ready for review October 7, 2026 10:22
@nsdeschenes
nsdeschenes requested review from a team as code owners October 7, 2026 10:22
@nsdeschenes
nsdeschenes requested a review from a team October 7, 2026 10:22
@nsdeschenes
nsdeschenes requested a review from a team as a code owner October 7, 2026 10:22
@nsdeschenes
nsdeschenes requested review from a team as code owners October 7, 2026 10:22
@nsdeschenes
nsdeschenes requested review from Lms24, chargome, msonnb and nicohrubec and removed request for a team October 7, 2026 10:22
Comment thread static/app/utils/reactRouterV6/dom.ts Resolved
Point the direct dependency at the patched snapshot introduced on master so frozen installs resolve it after the merge.
@nsdeschenes nsdeschenes added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Oct 7, 2026
@nsdeschenes
nsdeschenes merged commit 3efe5e6 into master Oct 7, 2026
100 of 143 checks passed
@nsdeschenes
nsdeschenes deleted the nd/react-router-v8-imports branch October 7, 2026 13:35

This branch was successfully deployed

1 active deployment
Preview — ebaab8db Deployed Oct 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants