You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-router

Package Overview
Dependencies
Maintainers
2
Versions
903
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router - npm Package Versions

2345
91

0.0.0-nightly-3fdce65c7-20250717

Diff
m
mjackson
published 0.0.0-nightly-3fdce65c7-20250717 •
m
mjackson
published 7.7.0 •

Changelog

Source

v7.7.0

Date: 2025-07-16

What's Changed

Unstable RSC APIs

We're excited to introduce experimental support for RSC in Data Mode via the following new APIs:

For more information, check out the blog post and the RSC Docs.

Minor Changes

  • create-react-router - Add Deno as a supported and detectable package manager. Note that this detection will only work with Deno versions 2.0.5 and above. If you are using an older version version of Deno then you must specify the --package-manager CLI flag set to deno. (#12327)
  • @react-router/remix-config-routes-adapter - Export DefineRouteFunction type alongside DefineRoutesFunction (#13945)

Patch Changes

  • react-router - Handle InvalidCharacterError when validating cookie signature (#13847)

  • react-router - Pass a copy of searchParams to the setSearchParams callback function to avoid mutations of the internal searchParams instance (#12784)

    • This causes bugs if you mutate the current stateful searchParams when a navigation is blocked because the internal instance gets out of sync with useLocation().search
  • react-router - Support invalid Date in turbo-stream v2 fork (#13684)

  • react-router - In Framework Mode, clear critical CSS in development after initial render (#13872, #13995)

  • react-router - Strip search parameters from patchRoutesOnNavigation path param for fetcher calls (#13911)

  • react-router - Skip scroll restoration on useRevalidator() calls because they're not new locations (#13671)

  • react-router - Support unencoded UTF-8 routes in prerender config with ssr set to false (#13699)

  • react-router - Do not throw if the url hash is not a valid URI component (#13247)

  • react-router - Remove Content-Length header from Single Fetch responses (#13902)

  • react-router - Fix a regression in createRoutesStub introduced with the middleware feature (#13946)

    • As part of that work we altered the signature to align with the new middleware APIs without making it backwards compatible with the prior AppLoadContext API

    • This permitted createRoutesStub to work if you were opting into middleware and the updated context typings, but broke createRoutesStub for users not yet opting into middleware

    • We've reverted this change and re-implemented it in such a way that both sets of users can leverage it

    • ⚠️ This may be a breaking bug for if you have adopted the unstable Middleware feature and are using createRoutesStub with the updated API.

      // If you have not opted into middleware, the old API should work again
      let context: AppLoadContext = {
        /*...*/
      };
      let Stub = createRoutesStub(routes, context);
      
      // If you have opted into middleware, you should now pass an instantiated
      // `unstable_routerContextProvider` instead of a `getContext` factory function.
      let context = new unstable_RouterContextProvider();
      context.set(SomeContext, someValue);
      let Stub = createRoutesStub(routes, context);
      
  • @react-router/dev - Update vite-node to ^3.2.2 to support Vite 7 (#13781)

  • @react-router/dev - Properly handle https protocol in dev mode (#13746)

  • @react-router/dev - Fix missing styles when Vite's build.cssCodeSplit option is disabled (#13943)

  • @react-router/dev - Allow .mts and .mjs extensions for route config file (#13931)

  • @react-router/dev - Fix prerender file locations when cwd differs from project root (#13824)

  • @react-router/dev - Improve chunk error logging when a chunk cannot be found during the build (#13799)

  • @react-router/dev - Fix incorrectly configured externalConditions which had enabled module condition for externals and broke builds with certain packages (like Emotion) (#13871)

Unstable Changes

⚠️ Unstable features are not recommended for production use

Changes by Package

Full Changelog: v7.6.3...v7.7.0

m
mjackson
published 7.7.0-pre.2 •
m
mjackson
published 0.0.0-nightly-a04f9d09b-20250716 •
m
mjackson
published 7.7.0-pre.1 •
m
mjackson
published 0.0.0-experimental-d4ee0faac •
m
mjackson
published 0.0.0-nightly-ae97fce46-20250712 •
m
mjackson
published 7.7.0-pre.0 •
m
mjackson
published 0.0.0-experimental-b3337fc38 •
m
mjackson
published 0.0.0-nightly-f358a1e90-20250711 •
2345
91