chore(deps): bump react-router from 7.18.1 to 8.3.0
Bumps react-router from 7.18.1 to 8.3.0.
Release notes
Sourced from react-router's releases.
v8.3.0
See the changelog for release notes: https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v830
v8.2.0
See the changelog for release notes: https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v820
v8.1.0
See the changelog for release notes: https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v810
v8.0.1
See the changelog for release notes: https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v801
v8.0.0
See the changelog for release notes: https://github.com/remix-run/react-router/blob/main/CHANGELOG.md#v800
Changelog
Sourced from react-router's changelog.
v8.3.0
Patch Changes
- Encode path params in
href/generatePathper RFC 3986 path-segment rules instead ofencodeURIComponent(#15310)
- Characters that are valid literally in a path segment (
$ & + , ; = : @— RFC 3986pchar) are no longer percent-encoded, so values like a semver build1.0.0+1interpolate unchanged instead of becoming1.0.0%2B1- Structural/unsafe characters (
/ ? # %, whitespace, non-ASCII) are still escaped exactly as before- Use
crypto.randomUUID()forcreateMemorySessionStoragesession ids (#15302)
createMemorySessionStorageis only intended for local development and testing - sessions are lost when the server restarts- Fix
NavLinknot applying itspendingstate whentohas a trailing slash (#15300)- Preserve RSC route component metadata so routes with a
clientLoadercan skip unnecessary server requests once their components have rendered while still fetching missing server-rendered elements (#15323)- Harden RSC CSRF code paths (#15311)
- Fix server crash (
TypeError: Invalid state: Unable to enqueue) when a request is aborted while the RSC HTML stream has a pending flush (#15286)
- Handle cancellation of the
injectRSCPayloadreadable side, clear the pending flush, and cancel the underlying RSC payload streamUnstable Changes
⚠️ Unstable features are not recommended for production use
Detect stale RSC clients during lazy route discovery and reload the destination document (#15318)
Migration
Apps using the default RSC Framework entry do not need to make any changes. Apps with a custom
entry.rsc.tsxshould import the generated client version and pass it tounstable_matchRSCServerRequest:import clientVersion from "virtual:react-router/unstable_rsc/client-version";
return unstable_matchRSCServerRequest({
// ...
clientVersion,
});
Add CSP nonce support to RSC document rendering (#15320)
- Add
nonceoptions tounstable_routeRSCServerRequestandunstable_RSCStaticRouter- Forward the nonce to the HTML renderer and apply it to injected RSC payload scripts and nonce-aware framework components
To adopt nonce-based CSP, update your
entry.ssr.tsx(runreact-router reveal entry.ssrfirst in RSC Framework Mode) to generate a fresh nonce for each request. Pass it torouteRSCServerRequest, spread therenderHTMLoptions into React's HTML renderer, passoptions.noncetoRSCStaticRouter, and use the same nonce in theContent-Security-Policyresponse header:const nonce = crypto.randomUUID(); const response = await routeRSCServerRequest({ request, serverResponse, createFromReadableStream, nonce, async renderHTML(getPayload, options) { const payload = getPayload(); return renderHTMLToReadableStream(
... (truncated)
Commits
2edaca7Release v8.3.0 (#15294)687ab72Prep release notesd2f1f1bupdate changes files to use h4 instead of h3 (#15334)8186207fix(rsc): preserve component metadata for client loader revalidation (#15323)c26e431feat(rsc): support CSP nonces in document rendering (#15320)6286f90feat(rsc): reload stale clients after new deployments (#15318)3d83ad4docs: fix useLinkClickHandler defaultShouldRevalidate default description (#1...f75c89fUpdate docs links to v8 API reference (#15316)baa9ba6fix: encode path params per RFC 3986 path-segment rules in href/generatePath ...69debd1fix: apply NavLink pending state when the to prop has a trailing slash (#15300)- Additional commits viewable in compare view
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the Security Alerts page.
Summary by cubic
Upgrades react-router from 7.18.1 to 8.3.0 for v8 features and fixes, including RFC‑3986-compliant path param encoding and improved NavLink pending state handling.
- Migration
- Requires
reactandreact-dom>=19.2.7; update if needed. - Requires Node >=22.22.0 for server/dev environments; update local and CI runtimes.
- Verify routes/links that include special characters in params (
$ & + , ; = : @) andNavLinkbehavior whentohas a trailing slash.
- Requires
Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.