Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 25, 2024

Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs from Renovate will soon appear from 'Mend'. Learn more here.

This PR contains the following updates:

Package Update Change
remix-run/react-router major 6.30.1 -> 7.9.1

Release Notes

remix-run/react-router (remix-run/react-router)

v7.9.1

Compare Source

Date: 2025-09-12

Patch Changes
  • Fix internal Future interface naming from middleware -> v8_middleware (#​14327)

Full Changelog: v7.9.0...v7.9.1

v7.9.0

Compare Source

Date: 2025-09-12

What's Changed
Stable Middleware and Context APIs

We have removed the unstable_ prefix from the following APIs and they are now considered stable and ready for production use:

Please see the Middleware Docs, the Middleware RFC, and the Client-side Context RFC for more information.

Minor Changes
  • Stabilize middleware and context APIs (#​14215)
Patch Changes
  • react-router - Update href() to correctly process routes that have an extension after the parameter or are a single optional parameter (#​13797)
  • react-router - Escape HTML in meta() JSON-LD content (#​14316)
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • react-router - RSC: Add react-server Await component implementation (#​14261)
  • react-router - RSC: Fix hydration errors for routes that only have client loaders when using RSC in Data Mode along with a custom basename (#​14264)
  • react-router - RSC: Make href function available in a react-server context (#​14262)
  • react-router - RSC: Decode each time getPayload() is called to allow for "in-context" decoding and hoisting of contextual assets (#​14248)

Full Changelog: v7.8.2...v7.9.0

v7.8.2

Compare Source

Date: 2025-08-22

Patch Changes
  • react-router - Maintain ReadonlyMap and ReadonlySet types in server response data. (#​13092)
  • react-router - Fix basename usage without a leading slash in data routers (#​11671)
  • react-router - Fix TypeError if you throw from patchRoutesOnNavigation when no partial matches exist (#​14198)
  • react-router - Properly escape interpolated param values in generatePath() (#​13530)
  • @react-router/dev - Fix potential memory leak in default entry.server (#​14200)
Unstable Changes

⚠️ Unstable features are not recommended for production use

Client-side onError

  • react-router - Add <RouterProvider unstable_onError>/<HydratedRouter unstable_onError> prop for client side error reporting (#​14162)

Middleware

  • react-router - Delay serialization of .data redirects to 202 responses until after middleware chain (#​14205)
  • react-router - Update client middleware so it returns the dataStrategy results up the chain allowing for more advanced post-processing middleware (#​14151, #​14212)
  • react-router - Remove Data Mode future.unstable_middleware flag from createBrowserRouter (#​14213)
    • This is only needed as a Framework Mode flag because of the route modules and the getLoadContext type behavior change
    • In Data Mode, it's an opt-in feature because it's just a new property on a route object, so there's no behavior changes that necessitate a flag

RSC

  • react-router - Allow opting out of revalidation on server actions with hidden $SKIP_REVALIDATION input (#​14154)

Full Changelog: v7.8.1...v7.8.2

v7.8.1

Compare Source

Date: 2025-08-15

Patch Changes
  • react-router - Fix usage of optional path segments in nested routes defined using absolute paths (#​14135)
  • react-router - Fix optional static segment matching in matchPath (#​11813)
  • react-router - Fix pre-rendering when a basename is set with ssr:false (#​13791)
  • react-router - Properly convert returned/thrown data() values to Response instances via Response.json() in resource routes and middleware (#​14159, #​14181)
  • @react-router/dev - Update generated Route.MetaArgs type so loaderData is only potentially undefined when an ErrorBoundary export is present (#​14173)
Unstable Changes

⚠️ Unstable features are not recommended for production use

Middleware

  • react-router - Bubble client pre-next middleware errors to the shallowest ancestor that needs to load, not strictly the shallowest ancestor with a loader (#​14150)
  • react-router - Propagate non-redirect Response values thrown from middleware to the error boundary on document/data requests (#​14182)

RSC

  • react-router - Provide isRouteErrorResponse utility in react-server environments (#​14166)
  • react-router - Handle meta and links Route Exports in RSC Data Mode (#​14136)

Full Changelog: v7.8.0...v7.8.1

v7.8.0

Compare Source

Date: 2025-08-07

What's Changed
Consistently named loaderData values

Ever noticed the discrepancies in loader data values handed to you by the framework? Like, we call it loaderData in your component props, but then match.data in your matches? Yeah, us too - as well as some keen-eyed React Router users who raised this in a proposal. We've added new loaderData fields alongside existing data fields in a few lingering spots to align with the loaderData naming used in the new Route.* APIs.

Improvements/fixes to the middleware APIs (unstable)

The biggest set of changes in 7.8.0 are to the unstable_middleware API's as we move closer to stabilizing them. If you've adopted the middleware APIs for early testing, please read the middleware changes below carefully. We hope to stabilize these soon so please let us know of any feedback you have on the API's in their current state!

Minor Changes
  • react-router - Add nonce prop to Links & PrefetchPageLinks (#​14048)
  • react-router - Add loaderData arguments/properties alongside existing data arguments/properties to provide consistency and clarity between loaderData and actionData across the board (#​14047)
    • Updated types: Route.MetaArgs, Route.MetaMatch, MetaArgs, MetaMatch, Route.ComponentProps.matches, UIMatch
    • @deprecated warnings have been added to the existing data properties to point users to new loaderData properties, in preparation for removing the data properties in a future major release
Patch Changes
  • react-router - Prevent "Did not find corresponding fetcher result" console error when navigating during a fetcher.submit revalidation (#​14114)

  • react-router - Switch Lazy Route Discovery manifest URL generation to use a standalone URLSearchParams instance instead of URL.searchParams to avoid a major performance bottleneck in Chrome (#​14084)

  • react-router - Adjust internal RSC usage of React.use to avoid Webpack compilation errors when using React 18 (#​14113)

  • react-router - Remove dependency on @types/node in TypeScript declaration files (#​14059)

  • react-router - Fix types for UIMatch to reflect that the loaderData/data properties may be undefined (#​12206)

    • When an ErrorBoundary is being rendered, not all active matches will have loader data available, since it may have been their loader that threw to trigger the boundary

    • The UIMatch.data type was not correctly handing this and would always reflect the presence of data, leading to the unexpected runtime errors when an ErrorBoundary was rendered

    • ⚠️ This may cause some type errors to show up in your code for unguarded match.data accesses - you should properly guard for undefined values in those scenarios.

      // app/root.tsx
      export function loader() {
        someFunctionThatThrows(); // ❌ Throws an Error
        return { title: "My Title" };
      }
      
      export function Layout({ children }: { children: React.ReactNode }) {
        let matches = useMatches();
        let rootMatch = matches[0] as UIMatch<Awaited<ReturnType<typeof loader>>>;
        //  ^ rootMatch.data is currently incorrectly typed here, so TypeScript does
        //    not complain if you do the following which throws an error at runtime:
        let { title } = rootMatch.data; // 💥
      
        return <html>...</html>;
      }
  • @react-router/dev - Fix rename without mkdir in Vite plugin (#​14105)

Unstable Changes

⚠️ Unstable features are not recommended for production use

RSC

  • react-router - Fix Data Mode issue where routes that return false from shouldRevalidate would be replaced by an <Outlet /> (#​14071)
  • react-router - Proxy server action side-effect redirects from actions for document and callServer requests (#​14131)

Middleware

  • react-router - Change the unstable_getContext signature on RouterProvider, HydratedRouter, and unstable_RSCHydratedRouter so that it returns an unstable_RouterContextProvider instance instead of a Map used to construct the instance internally (#​14097)

    • See the docs for more information
    • ⚠️ This is a breaking change if you have adopted the unstable_getContext prop
  • react-router - Run client middleware on client navigations even if no loaders exist (#​14106)

  • react-router - Convert internal middleware implementations to use the new unstable_generateMiddlewareResponse API (#​14103)

  • react-router - Ensure resource route errors go through handleError w/middleware enabled (#​14078)

  • react-router - Propagate returned Response from server middleware if next wasn't called (#​14093)

  • react-router - Allow server middlewares to return data() values which will be converted into a Response (#​14093, #​14128)

  • react-router - Update middleware error handling so that the next function never throws and instead handles any middleware errors at the proper ErrorBoundary and returns the Response up through the ancestor next function (#​14118)

    • See the error handling docs for more information
    • ⚠️ This changes existing functionality so if you are currently wrapping next calls in try/catch you should be able to remove those
  • react-router - Bubble client-side middleware errors prior to next to the appropriate ancestor error boundary (#​14138)

  • react-router - When middleware is enabled, make the context parameter read-only (Readonly<unstable_RouterContextProvider>) so that TypeScript will not allow you to write arbitrary fields to it in loaders, actions, or middleware. (#​14097)

  • react-router - Rename and alter the signature/functionality of the unstable_respond API in staticHandler.query/staticHandler.queryRoute (#​14103)

    • This only impacts users using createStaticHandler() for manual data loading during non-Framework Mode SSR

    • The API has been renamed to unstable_generateMiddlewareResponse for clarity

    • The main functional change is that instead of running the loaders/actions before calling unstable_respond and handing you the result, we now pass a query/queryRoute function as a parameter and you execute the loaders/actions inside your callback, giving you full access to pre-processing and error handling

    • The query version of the API now has a signature of (query: (r: Request) => Promise<StaticHandlerContext | Response>) => Promise<Response>

    • The queryRoute version of the API now has a signature of (queryRoute: (r: Request) => Promise<Response>) => Promise<Response>

    • This allows for more advanced usages such as running logic before/after calling query and direct error handling of errors thrown from query

    • ⚠️ This is a breaking change if you've adopted the staticHandler unstable_respond API

      let response = await staticHandler.query(request, {
        requestContext: new unstable_RouterContextProvider(),
        async unstable_generateMiddlewareResponse(query) {
          try {
            // At this point we've run middleware top-down so we need to call the
            // handlers and generate the Response to bubble back up the middleware
            let result = await query(request);
            if (isResponse(result)) {
              return result; // Redirects, etc.
            }
            return await generateHtmlResponse(result);
          } catch (error: unknown) {
            return generateErrorResponse(error);
          }
        },
      });
  • @react-router/{architect,cloudflare,express,node} - Change the getLoadContext signature (type GetLoadContextFunction) when future.unstable_middleware is enabled so that it returns an unstable_RouterContextProvider instance instead of a Map used to construct the instance internally (#​14097)

    • This also removes the type unstable_InitialContext export
    • See the middleware getLoadContext docs for more information
    • ⚠️ This is a breaking change if you have adopted middleware and are using a custom server with a getLoadContext function
Changes by Package

Full Changelog: v7.7.1...v7.8.0

v7.7.1

Compare Source

Date: 2025-07-24

Patch Changes
  • @react-router/dev - Update to Prettier v3 for formatting when running react-router reveal --no-typescript (#​14049)
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • react-router - RSC Data Mode: fix bug where routes with errors weren't forced to revalidate when shouldRevalidate returned false (#​14026)
  • react-router - RSC Data Mode: fix Matched leaf route at location "/..." does not have an element or Component warnings when error boundaries are rendered (#​14021)

Full Changelog: v7.7.0...v7.7.1

v7.7.0

Compare Source

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

v7.6.3

Compare Source

Date: 2025-06-27

Patch Changes
  • react-router - Do not serialize types for useRouteLoaderData<typeof clientLoader> (#​13752)

    • For types to distinguish a clientLoader from a serverLoader, you MUST annotate clientLoader args:

      //                                   👇 annotation required to skip serializing types
      export function clientLoader({}: Route.ClientLoaderArgs) {
        return { fn: () => "earth" };
      }
      
      function SomeComponent() {
        const data = useRouteLoaderData<typeof clientLoader>("routes/this-route");
        const planet = data?.fn() ?? "world";
        return <h1>Hello, {planet}!</h1>;
      }
  • @react-router/cloudflare - Remove tsup from peerDependencies (#​13757)

  • @react-router/dev - Add Vite 7 support (#​13748)

  • @react-router/dev - Skip package.json resolution checks when a custom entry.server.(j|t)sx file is provided (#​13744)

  • @react-router/dev - Add validation for a route's id not being 'root' (#​13792)

  • @react-router/fs-routes @react-router/remix-config-routes-adapter - Use replaceAll for normalizing windows file system slashes (#​13738)

  • @react-router/node - Remove old "install" package exports (#​13762)

Full Changelog: v7.6.2...v7.6.3

v7.6.2

Compare Source

Date: 2025-06-03

Patch Changes
  • create-react-router - Update tar-fs (#​13675)

  • react-router - (INTERNAL) Slight refactor of internal headers() function processing for use with RSC (#​13639)

  • react-router @react-router/dev - Avoid additional with-props chunk in Framework Mode by moving route module component prop logic from the Vite plugin to react-router (#​13650)

  • @react-router/dev - When future.unstable_viteEnvironmentApi is enabled and an absolute Vite base has been configured, ensure critical CSS is handled correctly during development (#​13598)

  • @react-router/dev - Update vite-node (#​13673)

  • @react-router/dev - Fix typegen for non-{.js,.jsx,.ts,.tsx} routes like .mdx (#​12453)

  • @react-router/dev - Fix href types for optional dynamic params (#​13725)

    7.6.1 introduced fixes for href when using optional static segments,
    but those fixes caused regressions with how optional dynamic params worked in 7.6.0:

    // 7.6.0
    href("/users/:id?"); // ✅
    href("/users/:id?", { id: 1 }); // ✅
    
    // 7.6.1
    href("/users/:id?"); // ❌
    href("/users/:id?", { id: 1 }); // ❌

    Now, optional static segments are expanded into different paths for href, but optional dynamic params are not.
    This way href can unambiguously refer to an exact URL path, all while keeping the number of path options to a minimum.

    // 7.6.2
    
    // path: /users/:id?/edit?
    href("
    //    ^ suggestions when cursor is here:
    //
    //    /users/:id?
    //    /users/:id?/edit

    Additionally, you can pass params from component props without needing to narrow them manually:

    declare const params: { id?: number };
    
    // 7.6.0
    href("/users/:id?", params);
    
    // 7.6.1
    href("/users/:id?", params); // ❌
    "id" in params ? href("/users/:id", params) : href("/users"); // works... but is annoying
    
    // 7.6.2
    href("/users/:id?", params); // restores behavior of 7.6.0

Full Changelog: v7.6.1...v7.6.2

v7.6.1

Compare Source

Date: 2025-05-25

Patch Changes
  • react-router - Partially revert optimization added in 7.1.4 to reduce calls to matchRoutes because it surfaced other issues (#​13562)

  • react-router - Update Route.MetaArgs to reflect that data can be potentially undefined (#​13563)

    • This is primarily for cases where a route loader threw an error to it's own ErrorBoundary, but it also arises in the case of a 404 which renders the root ErrorBoundary/meta but the root loader did not run because not routes matched
  • react-router - Avoid initial fetcher execution 404 error when Lazy Route Discovery is interrupted by a navigation (#​13564)

  • react-router - Properly href replaces splats * (#​13593)

    • href("/products/*", { "*": "/1/edit" }); // -> /products/1/edit
  • @react-router/architect - Update @architect/functions from ^5.2.0 to ^7.0.0 (#​13556)

  • @react-router/dev - Prevent typegen with route files that are outside the app/ directory (#​12996)

  • @react-router/dev - Add additional logging to build command output when cleaning assets from server build (#​13547)

  • @react-router/dev - Don't clean assets from server build when build.ssrEmitAssets has been enabled in Vite config (#​13547)

  • @react-router/dev - Fix typegen when same route is used at multiple paths (#​13574)

    • For example, routes/route.tsx is used at 4 different paths here:

      import { type RouteConfig, route } from "@&#8203;react-router/dev/routes";
      export default [
        route("base/:base", "routes/base.tsx", [
          route("home/:home", "routes/route.tsx", { id: "home" }),
          route("changelog/:changelog", "routes/route.tsx", { id: "changelog" }),
          route("splat/*", "routes/route.tsx", { id: "splat" }),
        ]),
        route("other/:other", "routes/route.tsx", { id: "other" }),
      ] satisfies RouteConfig;
    • Previously, typegen would arbitrarily pick one of these paths to be the "winner" and generate types for the route module based on that path

    • Now, typegen creates unions as necessary for alternate paths for the same route file

  • @react-router/dev - Better types for params (#​13543)

    • For example:

      // routes.ts
      import { type RouteConfig, route } from "@&#8203;react-router/dev/routes";
      
      export default [
        route("parent/:p", "routes/parent.tsx", [
          route("route/:r", "routes/route.tsx", [
            route("child1/:c1a/:c1b", "routes/child1.tsx"),
            route("child2/:c2a/:c2b", "routes/child2.tsx"),
          ]),
        ]),
      ] satisfies RouteConfig;
    • Previously, params for routes/route were calculated as { p: string, r: string }.

    • This incorrectly ignores params that could come from child routes

    • If visiting /parent/1/route/2/child1/3/4, the actual params passed to routes/route will have a type of { p: string, r: string, c1a: string, c1b: string }

    • Now, params are aware of child routes and autocompletion will include child params as optionals:

      params.|
      //     ^ cursor is here and you ask for autocompletion
      // p: string
      // r: string
      // c1a?: string
      // c1b?: string
      // c2a?: string
      // c2b?: string
    • You can also narrow the types for params as it is implemented as a normalized union of params for each page that includes routes/route:

      if (typeof params.c1a === 'string') {
        params.|
        //     ^ cursor is here and you ask for autocompletion
        // p: string
        // r: string
        // c1a: string
        // c1b: string
      }
  • @react-router/dev - Fix href for optional segments (#​13595)

    • Type generation now expands paths with optionals into their corresponding non-optional paths

    • For example, the path /user/:id? gets expanded into /user and /user/:id to more closely model visitable URLs

    • href then uses these expanded (non-optional) paths to construct type-safe paths for your app:

      // original: /user/:id?
      // expanded: /user & /user/:id
      href("/user"); // ✅
      href("/user/:id", { id: 1 }); // ✅
    • This becomes even more important for static optional paths where there wasn't a good way to indicate whether the optional should be included in the resulting path:

      // original: /products/:id/detail?
      
      // before
      href("/products/:id/detail?"); // ❌ How can we tell `href` to include or omit `detail?` segment with a complex API?
      
      // now
      // expanded: /products/:id & /products/:id/detail
      href("/product/:id"); // ✅
      href("/product/:id/detail"); // ✅
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • @react-router/dev - Renamed internal react-router/route-module export to react-router/internal (#​13543)
  • @react-router/dev - Removed Info export from generated +types/* files (#​13543)
  • @react-router/dev - Normalize dirent entry path across node versions when generating SRI manifest (#​13591)

Full Changelog: v7.6.0...v7.6.1

v7.6.0

Compare Source

Date: 2025-05-08

What's Changed
routeDiscovery Config Option

We've added a new config option in 7.6.0 which grants you more control over the Lazy Route Discovery feature. You can now configure the /__manifest path if you're running multiple RR applications on the same server, or you can also disable the feature entirely if your application is small enough and the feature isn't necessary.

// react-router.config.ts

export default {
  // You can modify the manifest path used:
  routeDiscovery: { mode: "lazy", manifestPath: "/custom-manifest" }

  // Or you can disable this feature entirely and include all routes in the
  // manifest on initial document load:
  routeDiscovery: { mode: "initial" }

  // If you don't specify anything, the default config is as follows, which enables
  // Lazy Route Discovery and makes manifest requests to the `/__manifest` path:
  // routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" }
} satisfies Config;
Automatic Types for Future Flags

Some future flags alter the way types should work in React Router. Previously, you had to remember to manually opt-in to the new types. For example, for future.unstable_middleware:

// react-router.config.ts

// Step 1: Enable middleware
export default {
  future: {
    unstable_middleware: true,
  },
};

// Step 2: Enable middleware types
declare module "react-router" {
  interface Future {
    unstable_middleware: true; // 👈 Enable middleware types
  }
}

It was up to you to keep the runtime future flags synced with the types for those flags. This was confusing and error-prone.

Now, React Router will automatically enable types for future flags. That means you only need to specify the runtime future flag:

// react-router.config.ts

// Step 1: Enable middleware
export default {
  future: {
    unstable_middleware: true,
  },
};

// No step 2! That's it!

Behind the scenes, React Router will generate the corresponding declare module into .react-router/types. Currently this is done in .react-router/types/+register.ts but this is an implementation detail that may change in the future.

Minor Changes
  • react-router - Added a new routeDiscovery option in react-router.config.ts to configure Lazy Route Discovery behavior (#​13451)

  • react-router - Add support for route component props in createRoutesStub (#​13528)

    • This allows you to unit test your route components using the props instead of the hooks:

      let RoutesStub = createRoutesStub([
        {
          path: "/",
          Component({ loaderData }) {
            let data = loaderData as { message: string };
            return <pre data-testid="data">Message: {data.message}</pre>;
          },
          loader() {
            return { message: "hello" };
          },
        },
      ]);
      
      render(<RoutesStub />);
      
      await waitFor(() => screen.findByText("Message: hello"));
  • @react-router/dev - Automatic types for future flags (#​13506)

Patch Changes

You may notice this list is a bit larger than usual! The team ate their vegetables last week and spent the week squashing bugs to work on lowering the issue count that had ballooned a bit since the v7 release.

  • react-router - Fix react-router module augmentation for NodeNext (#​13498)
  • react-router - Don't bundle react-router in react-router/dom CJS export (#​13497)
  • react-router - Fix bug where a submitting fetcher would get stuck in a loading state if a revalidating loader redirected (#​12873)
  • react-router - Fix hydration error if a server loader returned undefined (#​13496)
  • react-router - Fix initial load 404 scenarios in data mode (#​13500)
  • react-router - Stabilize useRevalidator's revalidate function (#​13542)
  • react-router - Preserve status code if a clientAction throws a data() result in framework mode (#​13522)
  • react-router - Be defensive against leading double slashes in paths to avoid Invalid URL errors from the URL constructor (#​13510)
    • Note we do not sanitize/normalize these paths - we only detect them so we can avoid the error that would be thrown by new URL("//", window.location.origin)
  • react-router - Remove Navigator declaration for navigator.connection.saveData to avoid messing with any other types beyond saveData in user land (#​13512)
  • react-router - Fix handleError params values on .data requests for routes with a dynamic param as the last URL segment (#​13481)
  • react-router - Don't trigger an ErrorBoundary UI before the reload when we detect a manifest version mismatch in Lazy Route Discovery (#​13480)
  • react-router - Inline [email protected] dependency and fix decoding ordering of Map/Set instances (#​13518)
  • react-router - Only render dev warnings during dev (#​13461)
  • react-router - Short circuit post-processing on aborted dataStrategy requests (#​13521)
    • This resolves non-user-facing console errors of the form Cannot read properties of undefined (reading 'result')
  • @react-router/dev - Support project root directories without a package.json if it exists in a parent directory (#​13472)
  • @react-router/dev - When providing a custom Vite config path via the CLI --config/-c flag, default the project root directory to the directory containing the Vite config when not explicitly provided (#​13472)
  • @react-router/dev - In a routes.ts context, ensure the --mode flag is respected for import.meta.env.MODE (#​13485)
    • Previously, import.meta.env.MODE within a routes.ts context was always "development" for the dev and typegen --watch commands, but otherwise resolved to "production". These defaults are still in place, but if a --mode flag is provided, this will now take precedence.
  • @react-router/dev - Ensure consistent project root directory resolution logic in CLI commands (#​13472)
  • @react-router/dev - When executing react-router.config.ts and routes.ts with vite-node, ensure that PostCSS config files are ignored (#​13489)
  • @react-router/dev - When extracting critical CSS during development, ensure it's loaded from the client environment to avoid issues with plugins that handle the SSR environment differently (#​13503)
  • @react-router/dev - Fix "Status message is not supported by HTTP/2" error during dev when using HTTPS (#​13460)
  • @react-router/dev - Update config when react-router.config.ts is created or deleted during development (#​12319)
  • @react-router/dev - Skip unnecessary routes.ts evaluation before Vite build is started (#​13513)
  • @react-router/dev - Fix TS2300: Duplicate identifier errors caused by generated types (#​13499)
  • Previously, routes that had the same full path would cause duplicate entries in the generated types for href (.react-router/types/+register.ts), causing type checking errors
Unstable Changes

⚠️ Unstable features are not recommended for production use

  • react-router - Fix a few bugs with error bubbling in middleware use-cases (#​13538)
  • @react-router/dev - When future.unstable_viteEnvironmentApi is enabled, ensure that build.assetsDir in Vite config is respected when environments.client.build.assetsDir is not configured (#​13491)
Changes by Package

Full Changelog: v7.5.3...v7.6.0

v7.5.3

Compare Source

Date: 2025-04-28

Patch Changes
  • react-router - Fix bug where bubbled action errors would result in loaderData being cleared at the handling ErrorBoundary route (#​13476)
  • react-router - Handle redirects from clientLoader.hydrate initial load executions (#​13477)

Full Changelog: v7.5.2...v7.5.3

v7.5.2

Compare Source

Date: 2025-04-24

Security Notice

Fixed 2 security vulnerabilities that could result in cache-poisoning attacks by sending specific headers intended for build-time usage for SPA Mode and Pre-rendering (GHSA-f46r-rw29-r322, GHSA-cpj6-fhp6-mr6j).

Patch Changes
  • react-router - Adjust approach for Pre-rendering/SPA Mode via headers (#​13453)
  • react-router - Update Single Fetch to also handle the 204 redirects used in ?_data requests in Remix v2 (#​13364)
    • This allows applications to trigger a redirect on .data requests from outside the scope of React Router (i.e., an express/hono middleware) the same way they did in Remix v2 before Single Fetch was implemented
    • This is a bit of an escape hatch - the recommended way to handle this is redirecting from a root route middleware
    • To use this functionality, you may return from a .data request wih a response as follows:
      • Set a 204 status code
      • Set an X-Remix-Redirect: <new-location> header
      • Optionally, set X-Remix-Replace: true or X-Remix-Reload-Document: true headers to replicate replace()/redirectDocument() functionality
    • ⚠️ Please note that these responses rely on implementation details that are subject to change without a SemVer major release, and it is recommended you set up integration tests for your application to confirm this functionality is working correctly with each future React Router upgrade

Full Changelog: v7.5.1...v7.5.2

v7.5.1

Compare Source

Date: 2025-04-17

Patch Changes
  • react-router - When using the object-based route.lazy API, the HydrateFallback and hydrateFallbackElement properties are now skipped when lazy loading routes after hydration (#​13376)

    • If you move the code for these properties into a separate file, since the hydrate properties were unused already (if the route wasn't present during hydration), you can avoid downloading them at all. For example:

      createBrowserRouter([
        {
          path: "/show/:showId",
          lazy: {
            loader: async () => (await import("./show.loader.js")).loader,
            Component: async () =>
              (await import("./show.component.js")).Component,
            HydrateFallback: async () =>
              (await import("./show.hydrate-fallback.js")).HydrateFallback,
          },
        },
      ]);
  • react-router - Fix single fe


Configuration

📅 Schedule: Branch creation - Between 12:00 AM and 03:59 AM, only on Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch 3 times, most recently from ace908f to 49b68b6 Compare December 3, 2024 07:00
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch 3 times, most recently from a80b66e to f489cb2 Compare December 23, 2024 17:32
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch 4 times, most recently from 8c03a7e to acc910e Compare January 20, 2025 06:48
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch 2 times, most recently from 827a3c5 to 3bba430 Compare February 1, 2025 20:56
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch from 3bba430 to eec505b Compare February 18, 2025 23:28
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch from eec505b to 30ff735 Compare March 6, 2025 23:09
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch from 30ff735 to d3177e8 Compare March 19, 2025 16:29
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch 2 times, most recently from 4b3269b to 9d68d3f Compare April 4, 2025 22:11
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch 2 times, most recently from 2a4ceb1 to a25c423 Compare April 17, 2025 15:56
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch 2 times, most recently from d5d45db to 6f6decf Compare April 28, 2025 23:41
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch 3 times, most recently from 255752f to dcec086 Compare May 12, 2025 04:32
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch 2 times, most recently from a5533b2 to 45ec38a Compare May 26, 2025 04:29
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch 2 times, most recently from 430d953 to e472ad7 Compare June 27, 2025 19:02
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch from e472ad7 to eb0fc5e Compare July 17, 2025 00:14
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch from eb0fc5e to 3c7fb9c Compare July 25, 2025 00:07
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch from 3c7fb9c to fff3a31 Compare August 7, 2025 20:46
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch 2 times, most recently from 6e93ccc to 7f33fe4 Compare August 22, 2025 20:07
@renovate renovate bot force-pushed the renovate/major-react-router-monorepo branch from 7f33fe4 to 46962a6 Compare September 13, 2025 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants