From a04dfa207694e1a556109c92c8f17d9ae91c3d95 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 2 Dec 2025 16:11:12 +0000 Subject: [PATCH 1/2] chore: Update version for release --- .changeset/bright-brooms-hammer.md | 7 --- .changeset/dull-moons-share.md | 24 -------- .changeset/fluffy-walls-add.md | 5 -- .changeset/long-brooms-shake.md | 5 -- .changeset/olive-planets-think.md | 28 ---------- .changeset/pre.json | 55 ------------------- .changeset/real-chairs-exercise.md | 5 -- .changeset/rotten-grapes-cough.md | 7 --- .changeset/shiny-pans-admire.md | 5 -- .changeset/six-ways-carry.md | 5 -- .changeset/spicy-camels-love.md | 5 -- .changeset/stabilize-split-route-modules.md | 7 --- .changeset/stabilize-vite-environment-api.md | 7 --- .changeset/tall-apples-film.md | 5 -- .changeset/witty-ears-itch.md | 29 ---------- integration/CHANGELOG.md | 1 + packages/create-react-router/CHANGELOG.md | 4 +- packages/create-react-router/package.json | 2 +- packages/react-router-architect/CHANGELOG.md | 17 ++---- packages/react-router-architect/package.json | 2 +- packages/react-router-cloudflare/CHANGELOG.md | 14 ++--- packages/react-router-cloudflare/package.json | 2 +- packages/react-router-dev/CHANGELOG.md | 25 ++++----- packages/react-router-dev/package.json | 2 +- packages/react-router-dom/CHANGELOG.md | 11 +--- packages/react-router-dom/package.json | 2 +- packages/react-router-express/CHANGELOG.md | 15 ++--- packages/react-router-express/package.json | 2 +- packages/react-router-fs-routes/CHANGELOG.md | 11 +--- packages/react-router-fs-routes/package.json | 2 +- packages/react-router-node/CHANGELOG.md | 16 +++--- packages/react-router-node/package.json | 2 +- .../CHANGELOG.md | 11 +--- .../package.json | 2 +- packages/react-router-serve/CHANGELOG.md | 19 ++----- packages/react-router-serve/package.json | 2 +- packages/react-router/CHANGELOG.md | 31 ++++++++--- packages/react-router/package.json | 2 +- 38 files changed, 81 insertions(+), 315 deletions(-) delete mode 100644 .changeset/bright-brooms-hammer.md delete mode 100644 .changeset/dull-moons-share.md delete mode 100644 .changeset/fluffy-walls-add.md delete mode 100644 .changeset/long-brooms-shake.md delete mode 100644 .changeset/olive-planets-think.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/real-chairs-exercise.md delete mode 100644 .changeset/rotten-grapes-cough.md delete mode 100644 .changeset/shiny-pans-admire.md delete mode 100644 .changeset/six-ways-carry.md delete mode 100644 .changeset/spicy-camels-love.md delete mode 100644 .changeset/stabilize-split-route-modules.md delete mode 100644 .changeset/stabilize-vite-environment-api.md delete mode 100644 .changeset/tall-apples-film.md delete mode 100644 .changeset/witty-ears-itch.md diff --git a/.changeset/bright-brooms-hammer.md b/.changeset/bright-brooms-hammer.md deleted file mode 100644 index 1c479745be..0000000000 --- a/.changeset/bright-brooms-hammer.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"react-router": patch ---- - -Fix a Framework Mode bug where the `defaultShouldRevalidate` parameter to `shouldRevalidate` would not be correct after `action` returned a 4xx/5xx response (`true` when it should have been `false`) - -- If your `shouldRevalidate` function relied on that parameter, you may have seen unintended revalidations diff --git a/.changeset/dull-moons-share.md b/.changeset/dull-moons-share.md deleted file mode 100644 index c7b4c14e77..0000000000 --- a/.changeset/dull-moons-share.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -"@react-router/dev": patch ---- - -Load environment variables before evaluating `routes.ts` - -For example, you can now compute your routes based on [`VITE_`-prefixed environment variables](https://vite.dev/guide/env-and-mode#env-variables): - -```txt -# .env -VITE_ENV_ROUTE=my-route -``` - -```ts -// app/routes.ts -import { type RouteConfig, route } from "@react-router/dev/routes"; - -const routes: RouteConfig = []; -if (import.meta.env.VITE_ENV_ROUTE === "my-route") { - routes.push(route("my-route", "routes/my-route.tsx")); -} - -export default routes; -``` diff --git a/.changeset/fluffy-walls-add.md b/.changeset/fluffy-walls-add.md deleted file mode 100644 index bf46e1a47a..0000000000 --- a/.changeset/fluffy-walls-add.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Fix `fetcher.submit` failing with plain objects containing a `tagName` property diff --git a/.changeset/long-brooms-shake.md b/.changeset/long-brooms-shake.md deleted file mode 100644 index 6d78c7abae..0000000000 --- a/.changeset/long-brooms-shake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -[UNSTABLE] Add `unstable_pattern` to the parameters for client side `unstable_onError`, refactor how it's called by `RouterProvider` to avoid potential strict mode issues diff --git a/.changeset/olive-planets-think.md b/.changeset/olive-planets-think.md deleted file mode 100644 index f29fc4ef65..0000000000 --- a/.changeset/olive-planets-think.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -"react-router": patch ---- - -Add new `unstable_useTransitions` flag to routers to give users control over the usage of [`React.startTransition`](https://react.dev/reference/react/startTransition) and [`React.useOptimistic`](https://react.dev/reference/react/useOptimistic). - -- Framework Mode + Data Mode: - - ``/`` - - When left unset (current default behavior) - - Router state updates are wrapped in `React.startTransition` - - ⚠️ This can lead to buggy behaviors if you are wrapping your own navigations/fetchers in `React.startTransition` - - You should set the flag to `true` if you run into this scenario to get the enhanced `useOptimistic` behavior (requires React 19) - - When set to `true` - - Router state updates remain wrapped in `React.startTransition` (as they are without the flag) - - `Link`/`Form` navigations will be wrapped in `React.startTransition` - - A subset of router state info will be surfaced to the UI _during_ navigations via `React.useOptimistic` (i.e., `useNavigation()`, `useFetchers()`, etc.) - - ⚠️ This is a React 19 API so you must also be React 19 to opt into this flag for Framework/Data Mode - - When set to `false` - - The router will not leverage `React.startTransition` or `React.useOptimistic` on any navigations or state changes -- Declarative Mode - - `` - - When left unset - - Router state updates are wrapped in `React.startTransition` - - When set to `true` - - Router state updates remain wrapped in `React.startTransition` (as they are without the flag) - - `Link`/`Form` navigations will be wrapped in `React.startTransition` - - When set to `false` - - the router will not leverage `React.startTransition` on any navigations or state changes diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index afd66a8da3..0000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "mode": "exit", - "tag": "pre", - "initialVersions": { - "integration": "0.0.0", - "integration-cloudflare-dev-proxy-template": "0.0.0", - "integration-rsc-parcel": "0.0.0", - "integration-rsc-vite": "0.0.0", - "integration-rsc-vite-framework": "0.0.0", - "integration-vite-5-template": "0.0.0", - "integration-vite-6-template": "0.0.0", - "integration-vite-7-beta-template": "0.0.0", - "integration-vite-plugin-cloudflare-template": "0.0.0", - "integration-vite-rolldown-template": "0.0.0", - "create-react-router": "7.9.6", - "react-router": "7.9.6", - "@react-router/architect": "7.9.6", - "@react-router/cloudflare": "7.9.6", - "@react-router/dev": "7.9.6", - "react-router-dom": "7.9.6", - "@react-router/express": "7.9.6", - "@react-router/fs-routes": "7.9.6", - "@react-router/node": "7.9.6", - "@react-router/remix-routes-option-adapter": "7.9.6", - "@react-router/serve": "7.9.6", - "@playground/framework": "0.0.0", - "@playground/framework-express": "0.0.0", - "@playground/framework-rolldown-vite": "0.0.0", - "@playground/framework-spa": "0.0.0", - "@playground/framework-vite-5": "0.0.0", - "@playground/framework-vite-7-beta": "0.0.0", - "@playground/rsc-parcel": "0.0.0", - "@playground/rsc-vite": "0.0.0", - "@playground/rsc-vite-framework": "0.0.0", - "@playground/split-route-modules": "0.0.0", - "@playground/split-route-modules-spa": "0.0.0", - "@playground/vite-plugin-cloudflare": "0.0.0" - }, - "changesets": [ - "bright-brooms-hammer", - "dull-moons-share", - "fluffy-walls-add", - "long-brooms-shake", - "olive-planets-think", - "real-chairs-exercise", - "rotten-grapes-cough", - "shiny-pans-admire", - "six-ways-carry", - "spicy-camels-love", - "stabilize-split-route-modules", - "stabilize-vite-environment-api", - "tall-apples-film", - "witty-ears-itch" - ] -} diff --git a/.changeset/real-chairs-exercise.md b/.changeset/real-chairs-exercise.md deleted file mode 100644 index 63f2c55006..0000000000 --- a/.changeset/real-chairs-exercise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Fix the promise returned from `useNavigate` in Framework/Data Mode so that it properly tracks the duration of `popstate` navigations (i.e., `navigate(-1)`) diff --git a/.changeset/rotten-grapes-cough.md b/.changeset/rotten-grapes-cough.md deleted file mode 100644 index 9b5da8b557..0000000000 --- a/.changeset/rotten-grapes-cough.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"react-router": minor ---- - -Stabilize `fetcher.reset()` - -- ⚠️ This is a breaking change if you have begun using `fetcher.unstable_reset()` diff --git a/.changeset/shiny-pans-admire.md b/.changeset/shiny-pans-admire.md deleted file mode 100644 index 32ad2616ab..0000000000 --- a/.changeset/shiny-pans-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Fix internal type error in useRoute types that surfaces when skipLibCheck is disabled diff --git a/.changeset/six-ways-carry.md b/.changeset/six-ways-carry.md deleted file mode 100644 index 3f965a1e7b..0000000000 --- a/.changeset/six-ways-carry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Preserve `statusText` on the `ErrorResponse` instance when throwing `data()` from a route handler diff --git a/.changeset/spicy-camels-love.md b/.changeset/spicy-camels-love.md deleted file mode 100644 index 46bf072730..0000000000 --- a/.changeset/spicy-camels-love.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Optimize href() to avoid backtracking regex on splat diff --git a/.changeset/stabilize-split-route-modules.md b/.changeset/stabilize-split-route-modules.md deleted file mode 100644 index e963ede3aa..0000000000 --- a/.changeset/stabilize-split-route-modules.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@react-router/dev": minor ---- - -Stabilize `future.v8_splitRouteModules`, replacing `future.unstable_splitRouteModules` - -- ⚠️ This is a breaking change if you have begun using `future.unstable_splitRouteModules`. Please update your `react-router.config.ts`. diff --git a/.changeset/stabilize-vite-environment-api.md b/.changeset/stabilize-vite-environment-api.md deleted file mode 100644 index 381b799bc5..0000000000 --- a/.changeset/stabilize-vite-environment-api.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@react-router/dev": minor ---- - -Stabilize `future.v8_viteEnvironmentApi`, replacing `future.unstable_viteEnvironmentApi` - -- ⚠️ This is a breaking change if you have begun using `future.unstable_viteEnvironmentApi`. Please update your `react-router.config.ts`. diff --git a/.changeset/tall-apples-film.md b/.changeset/tall-apples-film.md deleted file mode 100644 index 75fb815fec..0000000000 --- a/.changeset/tall-apples-film.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -[REMOVE] Update source code docs diff --git a/.changeset/witty-ears-itch.md b/.changeset/witty-ears-itch.md deleted file mode 100644 index 64a6582a76..0000000000 --- a/.changeset/witty-ears-itch.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -"react-router": minor ---- - -Stabilize the `dataStrategy` `match.shouldRevalidateArgs`/`match.shouldCallHandler()` APIs. - -- The `match.shouldLoad` API is now marked deprecated in favor of these more powerful alternatives -- If you're using this API in a custom `dataStrategy` today, you can swap to the new API at your convenience: - - ```tsx - // Before - const matchesToLoad = matches.filter((m) => m.shouldLoad); - - // After - const matchesToLoad = matches.filter((m) => m.shouldCallHandler()); - ``` - -- `match.shouldRevalidateArgs` is the argument that will be passed to the route `shouldRevaliate` function -- Combined with the parameter accepted by `match.shouldCallHandler`, you can define a custom revalidation behavior for your `dataStrategy`: - -```tsx -const matchesToLoad = matches.filter((m) => { - const defaultShouldRevalidate = customRevalidationBehavior( - match.shouldRevalidateArgs, - ); - return m.shouldCallHandler(defaultShouldRevalidate); - // The argument here will override the internal `defaultShouldRevalidate` value -}); -``` diff --git a/integration/CHANGELOG.md b/integration/CHANGELOG.md index 2cf67d87b7..6fccf850d7 100644 --- a/integration/CHANGELOG.md +++ b/integration/CHANGELOG.md @@ -5,6 +5,7 @@ ### Minor Changes - Unstable Vite support for Node-based Remix apps ([#7590](https://github.com/remix-run/remix/pull/7590)) + - `remix build` 👉 `vite build && vite build --ssr` - `remix dev` 👉 `vite dev` diff --git a/packages/create-react-router/CHANGELOG.md b/packages/create-react-router/CHANGELOG.md index 4d104c7c35..98e7ebc7ae 100644 --- a/packages/create-react-router/CHANGELOG.md +++ b/packages/create-react-router/CHANGELOG.md @@ -1,8 +1,6 @@ # `create-react-router` -## 7.10.0-pre.1 - -## 7.10.0-pre.0 +## 7.10.0 ## 7.9.6 diff --git a/packages/create-react-router/package.json b/packages/create-react-router/package.json index bc2ee0851f..da5a573821 100644 --- a/packages/create-react-router/package.json +++ b/packages/create-react-router/package.json @@ -1,6 +1,6 @@ { "name": "create-react-router", - "version": "7.10.0-pre.1", + "version": "7.10.0", "description": "Create a new React Router app", "homepage": "https://reactrouter.com", "bugs": { diff --git a/packages/react-router-architect/CHANGELOG.md b/packages/react-router-architect/CHANGELOG.md index 620a38e5bf..8142a98c68 100644 --- a/packages/react-router-architect/CHANGELOG.md +++ b/packages/react-router-architect/CHANGELOG.md @@ -1,20 +1,12 @@ # `@react-router/architect` -## 7.10.0-pre.1 +## 7.10.0 ### Patch Changes - Updated dependencies: - - `react-router@7.10.0-pre.1` - - `@react-router/node@7.10.0-pre.1` - -## 7.10.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.10.0-pre.0` - - `@react-router/node@7.10.0-pre.0` + - `react-router@7.10.0` + - `@react-router/node@7.10.0` ## 7.9.6 @@ -71,6 +63,7 @@ - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215)) We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use: + - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider) - [`createContext`](https://reactrouter.com/api/utils/createContext) - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option @@ -294,6 +287,7 @@ ### Major Changes - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837)) + - `createCookie` - `createCookieSessionStorage` - `createMemorySessionStorage` @@ -302,6 +296,7 @@ For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html) Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed: + - `createCookieFactory` - `createSessionStorageFactory` - `createCookieSessionStorageFactory` diff --git a/packages/react-router-architect/package.json b/packages/react-router-architect/package.json index 2d8ecbf2cb..0862e92715 100644 --- a/packages/react-router-architect/package.json +++ b/packages/react-router-architect/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/architect", - "version": "7.10.0-pre.1", + "version": "7.10.0", "description": "Architect server request handler for React Router", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-cloudflare/CHANGELOG.md b/packages/react-router-cloudflare/CHANGELOG.md index 7fae5bef25..800ca4c50c 100644 --- a/packages/react-router-cloudflare/CHANGELOG.md +++ b/packages/react-router-cloudflare/CHANGELOG.md @@ -1,18 +1,11 @@ # `@react-router/cloudflare` -## 7.10.0-pre.1 +## 7.10.0 ### Patch Changes - Updated dependencies: - - `react-router@7.10.0-pre.1` - -## 7.10.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.10.0-pre.0` + - `react-router@7.10.0` ## 7.9.6 @@ -63,6 +56,7 @@ - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215)) We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use: + - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider) - [`createContext`](https://reactrouter.com/api/utils/createContext) - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option @@ -261,6 +255,7 @@ - For Remix consumers migrating to React Router, all exports from `@remix-run/cloudflare-pages` are now provided for React Router consumers in the `@react-router/cloudflare` package. There is no longer a separate package for Cloudflare Pages. ([#11801](https://github.com/remix-run/react-router/pull/11801)) - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837)) + - `createCookie` - `createCookieSessionStorage` - `createMemorySessionStorage` @@ -269,6 +264,7 @@ For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html) Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed: + - `createCookieFactory` - `createSessionStorageFactory` - `createCookieSessionStorageFactory` diff --git a/packages/react-router-cloudflare/package.json b/packages/react-router-cloudflare/package.json index b3e443b965..c1161a604b 100644 --- a/packages/react-router-cloudflare/package.json +++ b/packages/react-router-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/cloudflare", - "version": "7.10.0-pre.1", + "version": "7.10.0", "description": "Cloudflare platform abstractions for React Router", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-dev/CHANGELOG.md b/packages/react-router-dev/CHANGELOG.md index 0ffe00acab..ded26f4124 100644 --- a/packages/react-router-dev/CHANGELOG.md +++ b/packages/react-router-dev/CHANGELOG.md @@ -1,15 +1,6 @@ # `@react-router/dev` -## 7.10.0-pre.1 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.10.0-pre.1` - - `@react-router/node@7.10.0-pre.1` - - `@react-router/serve@7.10.0-pre.1` - -## 7.10.0-pre.0 +## 7.10.0 ### Minor Changes @@ -43,9 +34,9 @@ ``` - Updated dependencies: - - `react-router@7.10.0-pre.0` - - `@react-router/node@7.10.0-pre.0` - - `@react-router/serve@7.10.0-pre.0` + - `react-router@7.10.0` + - `@react-router/node@7.10.0` + - `@react-router/serve@7.10.0` ## 7.9.6 @@ -227,6 +218,7 @@ - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215)) We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use: + - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider) - [`createContext`](https://reactrouter.com/api/utils/createContext) - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option @@ -969,6 +961,7 @@ ``` This initial implementation targets type inference for: + - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module - `ActionData` : Action data from `action` and/or `clientAction` within your route module @@ -983,6 +976,7 @@ ``` Check out our docs for more: + - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety) - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety) @@ -1182,6 +1176,7 @@ - Vite: Provide `Unstable_ServerBundlesFunction` and `Unstable_VitePluginConfig` types ([#8654](https://github.com/remix-run/remix/pull/8654)) - Vite: add `--sourcemapClient` and `--sourcemapServer` flags to `remix vite:build` ([#8613](https://github.com/remix-run/remix/pull/8613)) + - `--sourcemapClient` - `--sourcemapClient=inline` @@ -1518,6 +1513,7 @@ - Add support for `clientLoader`/`clientAction`/`HydrateFallback` route exports ([RFC](https://github.com/remix-run/remix/discussions/7634)) ([#8173](https://github.com/remix-run/remix/pull/8173)) Remix now supports loaders/actions that run on the client (in addition to, or instead of the loader/action that runs on the server). While we still recommend server loaders/actions for the majority of your data needs in a Remix app - these provide some levers you can pull for more advanced use-cases such as: + - Leveraging a data source local to the browser (i.e., `localStorage`) - Managing a client-side cache of server data (like `IndexedDB`) - Bypassing the Remix server in a BFF setup and hitting your API directly from the browser @@ -1921,6 +1917,7 @@ - Output esbuild metafiles for bundle analysis ([#6772](https://github.com/remix-run/remix/pull/6772)) Written to server build directory (`build/` by default): + - `metafile.css.json` - `metafile.js.json` (browser JS) - `metafile.server.json` (server JS) @@ -2018,6 +2015,7 @@ - built-in tls support ([#6483](https://github.com/remix-run/remix/pull/6483)) New options: + - `--tls-key` / `tlsKey`: TLS key - `--tls-cert` / `tlsCert`: TLS Certificate @@ -2288,6 +2286,7 @@ ``` The dev server will: + - force `NODE_ENV=development` and warn you if it was previously set to something else - rebuild your app whenever your Remix app code changes - restart your app server whenever rebuilds succeed diff --git a/packages/react-router-dev/package.json b/packages/react-router-dev/package.json index 2bee34450f..89ea0e5ff8 100644 --- a/packages/react-router-dev/package.json +++ b/packages/react-router-dev/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/dev", - "version": "7.10.0-pre.1", + "version": "7.10.0", "description": "Dev tools and CLI for React Router", "homepage": "https://reactrouter.com", "bugs": { diff --git a/packages/react-router-dom/CHANGELOG.md b/packages/react-router-dom/CHANGELOG.md index c5d03c6078..156553ae65 100644 --- a/packages/react-router-dom/CHANGELOG.md +++ b/packages/react-router-dom/CHANGELOG.md @@ -1,18 +1,11 @@ # react-router-dom -## 7.10.0-pre.1 +## 7.10.0 ### Patch Changes - Updated dependencies: - - `react-router@7.10.0-pre.1` - -## 7.10.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.10.0-pre.0` + - `react-router@7.10.0` ## 7.9.6 diff --git a/packages/react-router-dom/package.json b/packages/react-router-dom/package.json index 831cbff110..0c460545e4 100644 --- a/packages/react-router-dom/package.json +++ b/packages/react-router-dom/package.json @@ -1,6 +1,6 @@ { "name": "react-router-dom", - "version": "7.10.0-pre.1", + "version": "7.10.0", "description": "Declarative routing for React web applications", "keywords": [ "react", diff --git a/packages/react-router-express/CHANGELOG.md b/packages/react-router-express/CHANGELOG.md index 1508638127..ed57c8b2b3 100644 --- a/packages/react-router-express/CHANGELOG.md +++ b/packages/react-router-express/CHANGELOG.md @@ -1,20 +1,12 @@ # `@react-router/express` -## 7.10.0-pre.1 +## 7.10.0 ### Patch Changes - Updated dependencies: - - `react-router@7.10.0-pre.1` - - `@react-router/node@7.10.0-pre.1` - -## 7.10.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.10.0-pre.0` - - `@react-router/node@7.10.0-pre.0` + - `react-router@7.10.0` + - `@react-router/node@7.10.0` ## 7.9.6 @@ -71,6 +63,7 @@ - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215)) We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use: + - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider) - [`createContext`](https://reactrouter.com/api/utils/createContext) - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option diff --git a/packages/react-router-express/package.json b/packages/react-router-express/package.json index 99ce951521..ed75dbe6e7 100644 --- a/packages/react-router-express/package.json +++ b/packages/react-router-express/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/express", - "version": "7.10.0-pre.1", + "version": "7.10.0", "description": "Express server request handler for React Router", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-fs-routes/CHANGELOG.md b/packages/react-router-fs-routes/CHANGELOG.md index abe6aa774d..5a11b3b4ce 100644 --- a/packages/react-router-fs-routes/CHANGELOG.md +++ b/packages/react-router-fs-routes/CHANGELOG.md @@ -1,18 +1,11 @@ # `@react-router/fs-routes` -## 7.10.0-pre.1 +## 7.10.0 ### Patch Changes - Updated dependencies: - - `@react-router/dev@7.10.0-pre.1` - -## 7.10.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.10.0-pre.0` + - `@react-router/dev@7.10.0` ## 7.9.6 diff --git a/packages/react-router-fs-routes/package.json b/packages/react-router-fs-routes/package.json index f4f798f86b..ede8aa593d 100644 --- a/packages/react-router-fs-routes/package.json +++ b/packages/react-router-fs-routes/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/fs-routes", - "version": "7.10.0-pre.1", + "version": "7.10.0", "description": "File system routing conventions for React Router, for use within routes.ts", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-node/CHANGELOG.md b/packages/react-router-node/CHANGELOG.md index ff7c300770..1f60960891 100644 --- a/packages/react-router-node/CHANGELOG.md +++ b/packages/react-router-node/CHANGELOG.md @@ -1,18 +1,11 @@ # `@react-router/node` -## 7.10.0-pre.1 +## 7.10.0 ### Patch Changes - Updated dependencies: - - `react-router@7.10.0-pre.1` - -## 7.10.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.10.0-pre.0` + - `react-router@7.10.0` ## 7.9.6 @@ -64,6 +57,7 @@ - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215)) We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use: + - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider) - [`createContext`](https://reactrouter.com/api/utils/createContext) - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option @@ -263,6 +257,7 @@ - Remove single fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522)) - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837)) + - `createCookie` - `createCookieSessionStorage` - `createMemorySessionStorage` @@ -271,6 +266,7 @@ For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html) Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed: + - `createCookieFactory` - `createSessionStorageFactory` - `createCookieSessionStorageFactory` @@ -678,10 +674,12 @@ - Introduces the `defer()` API from `@remix-run/router` with support for server-rendering and HTTP streaming. This utility allows you to defer values returned from `loader` functions by returning promises instead of resolved values. This has been refered to as _"sending a promise over the wire"_. ([#4920](https://github.com/remix-run/remix/pull/4920)) Informational Resources: + - - Documentation Resources (better docs specific to Remix are in the works): + - - - diff --git a/packages/react-router-node/package.json b/packages/react-router-node/package.json index 86608db4d1..677c6e4fe3 100644 --- a/packages/react-router-node/package.json +++ b/packages/react-router-node/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/node", - "version": "7.10.0-pre.1", + "version": "7.10.0", "description": "Node.js platform abstractions for React Router", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-remix-routes-option-adapter/CHANGELOG.md b/packages/react-router-remix-routes-option-adapter/CHANGELOG.md index a97363ec06..141c35dd7f 100644 --- a/packages/react-router-remix-routes-option-adapter/CHANGELOG.md +++ b/packages/react-router-remix-routes-option-adapter/CHANGELOG.md @@ -1,18 +1,11 @@ # `@react-router/remix-config-routes-adapter` -## 7.10.0-pre.1 +## 7.10.0 ### Patch Changes - Updated dependencies: - - `@react-router/dev@7.10.0-pre.1` - -## 7.10.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `@react-router/dev@7.10.0-pre.0` + - `@react-router/dev@7.10.0` ## 7.9.6 diff --git a/packages/react-router-remix-routes-option-adapter/package.json b/packages/react-router-remix-routes-option-adapter/package.json index 8bb905cd4c..da90307840 100644 --- a/packages/react-router-remix-routes-option-adapter/package.json +++ b/packages/react-router-remix-routes-option-adapter/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/remix-routes-option-adapter", - "version": "7.10.0-pre.1", + "version": "7.10.0", "description": "Adapter for Remix's \"routes\" config option, for use within routes.ts", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router-serve/CHANGELOG.md b/packages/react-router-serve/CHANGELOG.md index b28482c2f3..6da7028144 100644 --- a/packages/react-router-serve/CHANGELOG.md +++ b/packages/react-router-serve/CHANGELOG.md @@ -1,22 +1,13 @@ # `@react-router/serve` -## 7.10.0-pre.1 +## 7.10.0 ### Patch Changes - Updated dependencies: - - `react-router@7.10.0-pre.1` - - `@react-router/node@7.10.0-pre.1` - - `@react-router/express@7.10.0-pre.1` - -## 7.10.0-pre.0 - -### Patch Changes - -- Updated dependencies: - - `react-router@7.10.0-pre.0` - - `@react-router/node@7.10.0-pre.0` - - `@react-router/express@7.10.0-pre.0` + - `react-router@7.10.0` + - `@react-router/node@7.10.0` + - `@react-router/express@7.10.0` ## 7.9.6 @@ -690,10 +681,12 @@ - Introduces the `defer()` API from `@remix-run/router` with support for server-rendering and HTTP streaming. This utility allows you to defer values returned from `loader` functions by returning promises instead of resolved values. This has been refered to as _"sending a promise over the wire"_. ([#4920](https://github.com/remix-run/remix/pull/4920)) Informational Resources: + - - Documentation Resources (better docs specific to Remix are in the works): + - - - diff --git a/packages/react-router-serve/package.json b/packages/react-router-serve/package.json index b93f4de28b..859abb7111 100644 --- a/packages/react-router-serve/package.json +++ b/packages/react-router-serve/package.json @@ -1,6 +1,6 @@ { "name": "@react-router/serve", - "version": "7.10.0-pre.1", + "version": "7.10.0", "description": "Production application server for React Router", "bugs": { "url": "https://github.com/remix-run/react-router/issues" diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index 6d3492e023..68d017b76c 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -1,12 +1,6 @@ # `react-router` -## 7.10.0-pre.1 - -### Patch Changes - -- [REMOVE] Update source code docs ([`1f8fee408`](https://github.com/remix-run/react-router/commit/1f8fee408db2f74dcc4b04eeb51009da5d51d8a6)) - -## 7.10.0-pre.0 +## 7.10.0 ### Minor Changes @@ -14,7 +8,9 @@ - ⚠️ This is a breaking change if you have begun using `fetcher.unstable_reset()` - Stabilize the `dataStrategy` `match.shouldRevalidateArgs`/`match.shouldCallHandler()` APIs. ([#14592](https://github.com/remix-run/react-router/pull/14592)) + - The `match.shouldLoad` API is now marked deprecated in favor of these more powerful alternatives + - If you're using this API in a custom `dataStrategy` today, you can swap to the new API at your convenience: ```tsx @@ -26,6 +22,7 @@ ``` - `match.shouldRevalidateArgs` is the argument that will be passed to the route `shouldRevaliate` function + - Combined with the parameter accepted by `match.shouldCallHandler`, you can define a custom revalidation behavior for your `dataStrategy`: ```tsx @@ -44,7 +41,9 @@ - If your `shouldRevalidate` function relied on that parameter, you may have seen unintended revalidations - Fix `fetcher.submit` failing with plain objects containing a `tagName` property ([#14534](https://github.com/remix-run/react-router/pull/14534)) -- [UNSTABLE] Add `unstable_pattern` to the parameters for client side `unstable_onError`, refactor how it's called by `RouterProvider` to avoid potential strict mode issues ([#14573](https://github.com/remix-run/react-router/pull/14573)) + +- \[UNSTABLE] Add `unstable_pattern` to the parameters for client side `unstable_onError`, refactor how it's called by `RouterProvider` to avoid potential strict mode issues ([#14573](https://github.com/remix-run/react-router/pull/14573)) + - Add new `unstable_useTransitions` flag to routers to give users control over the usage of [`React.startTransition`](https://react.dev/reference/react/startTransition) and [`React.useOptimistic`](https://react.dev/reference/react/useOptimistic). ([#14524](https://github.com/remix-run/react-router/pull/14524)) - Framework Mode + Data Mode: - ``/`` @@ -70,10 +69,15 @@ - the router will not leverage `React.startTransition` on any navigations or state changes - Fix the promise returned from `useNavigate` in Framework/Data Mode so that it properly tracks the duration of `popstate` navigations (i.e., `navigate(-1)`) ([#14524](https://github.com/remix-run/react-router/pull/14524)) + - Fix internal type error in useRoute types that surfaces when skipLibCheck is disabled ([#14577](https://github.com/remix-run/react-router/pull/14577)) + - Preserve `statusText` on the `ErrorResponse` instance when throwing `data()` from a route handler ([#14555](https://github.com/remix-run/react-router/pull/14555)) + - Optimize href() to avoid backtracking regex on splat ([#14329](https://github.com/remix-run/react-router/pull/14329)) +- \[REMOVE] Update source code docs ([`1f8fee408`](https://github.com/remix-run/react-router/commit/1f8fee408db2f74dcc4b04eeb51009da5d51d8a6)) + ## 7.9.6 ### Patch Changes @@ -135,6 +139,7 @@ - Ensure action handlers run for routes with middleware even if no loader is present ([#14443](https://github.com/remix-run/react-router/pull/14443)) - Add `unstable_instrumentations` API to allow users to add observablity to their apps by instrumenting route loaders, actions, middlewares, lazy, as well as server-side request handlers and client side navigations/fetches ([#14412](https://github.com/remix-run/react-router/pull/14412)) + - Framework Mode: - `entry.server.tsx`: `export const unstable_instrumentations = [...]` - `entry.client.tsx`: `` @@ -296,6 +301,7 @@ - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215)) We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use: + - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider) - [`createContext`](https://reactrouter.com/api/utils/createContext) - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option @@ -322,7 +328,7 @@ - \[UNSTABLE] Add ``/`` prop for client side error reporting ([#14162](https://github.com/remix-run/react-router/pull/14162)) -- server action revalidation opt out via $SKIP_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154)) +- server action revalidation opt out via $SKIP\_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154)) - Properly escape interpolated param values in `generatePath()` ([#13530](https://github.com/remix-run/react-router/pull/13530)) @@ -371,6 +377,7 @@ - Remove dependency on `@types/node` in TypeScript declaration files ([#14059](https://github.com/remix-run/react-router/pull/14059)) - Fix types for `UIMatch` to reflect that the `loaderData`/`data` properties may be `undefined` ([#12206](https://github.com/remix-run/react-router/pull/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. @@ -404,6 +411,7 @@ - \[UNSTABLE] When middleware is enabled, make the `context` parameter read-only (via `Readonly`) so that TypeScript will not allow you to write arbitrary fields to it in loaders, actions, or middleware. ([#14097](https://github.com/remix-run/react-router/pull/14097)) - \[UNSTABLE] Rename and alter the signature/functionality of the `unstable_respond` API in `staticHandler.query`/`staticHandler.queryRoute` ([#14103](https://github.com/remix-run/react-router/pull/14103)) + - 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) => Promise` @@ -1049,6 +1057,7 @@ ``` Similar to server-side requests, a fresh `context` will be created per navigation (or `fetcher` call). If you have initial data you'd like to populate in the context for every request, you can provide an `unstable_getContext` function at the root of your app: + - Library mode - `createBrowserRouter(routes, { unstable_getContext })` - Framework mode - `` @@ -1236,6 +1245,7 @@ _No changes_ - Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697)) - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837)) + - `createCookie` - `createCookieSessionStorage` - `createMemorySessionStorage` @@ -1244,6 +1254,7 @@ _No changes_ For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html) Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed: + - `createCookieFactory` - `createSessionStorageFactory` - `createCookieSessionStorageFactory` @@ -1399,6 +1410,7 @@ _No changes_ ``` This initial implementation targets type inference for: + - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module - `ActionData` : Action data from `action` and/or `clientAction` within your route module @@ -1413,6 +1425,7 @@ _No changes_ ``` Check out our docs for more: + - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety) - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety) diff --git a/packages/react-router/package.json b/packages/react-router/package.json index 91e0fadeab..29b8e5cc80 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "react-router", - "version": "7.10.0-pre.1", + "version": "7.10.0", "description": "Declarative routing for React", "keywords": [ "react", From 7a8c68f9286345f6fb400d745430b9515a8c19b2 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 2 Dec 2025 11:20:13 -0500 Subject: [PATCH 2/2] Update release notes --- CHANGELOG.md | 4 ++-- packages/create-react-router/CHANGELOG.md | 6 ++++++ packages/react-router/CHANGELOG.md | 14 +------------- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f01e823f7..064a1af494 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,9 +15,9 @@ We manage release notes in this file instead of the paginated Github Releases Pa - [React Router Releases](#react-router-releases) - [v7.10.0](#v7100) - [What's Changed](#whats-changed) - - [Stabilized `fetcher.reset()`](#stabilized-fetcherreset) - [Stabilized `future.v8_splitRouteModules`](#stabilized-futurev8_splitroutemodules) - [Stabilized `future.v8_viteEnvironmentApi`](#stabilized-futurev8_viteenvironmentapi) + - [Stabilized `fetcher.reset()`](#stabilized-fetcherreset) - [Stabilized `DataStrategyMatch.shouldCallHandler()`](#stabilized-datastrategymatchshouldcallhandler) - [Minor Changes](#minor-changes) - [Patch Changes](#patch-changes) @@ -393,7 +393,7 @@ Date: YYYY-MM-DD ## v7.10.0 -Date: 2025-12-2 +Date: 2025-12-02 ### What's Changed diff --git a/packages/create-react-router/CHANGELOG.md b/packages/create-react-router/CHANGELOG.md index 98e7ebc7ae..b1a09daa0e 100644 --- a/packages/create-react-router/CHANGELOG.md +++ b/packages/create-react-router/CHANGELOG.md @@ -2,10 +2,16 @@ ## 7.10.0 +_No changes_ + ## 7.9.6 +_No changes_ + ## 7.9.5 +_No changes_ + ## 7.9.4 _No changes_ diff --git a/packages/react-router/CHANGELOG.md b/packages/react-router/CHANGELOG.md index 68d017b76c..dfe7f01353 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -8,7 +8,6 @@ - ⚠️ This is a breaking change if you have begun using `fetcher.unstable_reset()` - Stabilize the `dataStrategy` `match.shouldRevalidateArgs`/`match.shouldCallHandler()` APIs. ([#14592](https://github.com/remix-run/react-router/pull/14592)) - - The `match.shouldLoad` API is now marked deprecated in favor of these more powerful alternatives - If you're using this API in a custom `dataStrategy` today, you can swap to the new API at your convenience: @@ -76,8 +75,6 @@ - Optimize href() to avoid backtracking regex on splat ([#14329](https://github.com/remix-run/react-router/pull/14329)) -- \[REMOVE] Update source code docs ([`1f8fee408`](https://github.com/remix-run/react-router/commit/1f8fee408db2f74dcc4b04eeb51009da5d51d8a6)) - ## 7.9.6 ### Patch Changes @@ -139,7 +136,6 @@ - Ensure action handlers run for routes with middleware even if no loader is present ([#14443](https://github.com/remix-run/react-router/pull/14443)) - Add `unstable_instrumentations` API to allow users to add observablity to their apps by instrumenting route loaders, actions, middlewares, lazy, as well as server-side request handlers and client side navigations/fetches ([#14412](https://github.com/remix-run/react-router/pull/14412)) - - Framework Mode: - `entry.server.tsx`: `export const unstable_instrumentations = [...]` - `entry.client.tsx`: `` @@ -301,7 +297,6 @@ - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215)) We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use: - - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider) - [`createContext`](https://reactrouter.com/api/utils/createContext) - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option @@ -328,7 +323,7 @@ - \[UNSTABLE] Add ``/`` prop for client side error reporting ([#14162](https://github.com/remix-run/react-router/pull/14162)) -- server action revalidation opt out via $SKIP\_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154)) +- server action revalidation opt out via $SKIP_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154)) - Properly escape interpolated param values in `generatePath()` ([#13530](https://github.com/remix-run/react-router/pull/13530)) @@ -377,7 +372,6 @@ - Remove dependency on `@types/node` in TypeScript declaration files ([#14059](https://github.com/remix-run/react-router/pull/14059)) - Fix types for `UIMatch` to reflect that the `loaderData`/`data` properties may be `undefined` ([#12206](https://github.com/remix-run/react-router/pull/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. @@ -411,7 +405,6 @@ - \[UNSTABLE] When middleware is enabled, make the `context` parameter read-only (via `Readonly`) so that TypeScript will not allow you to write arbitrary fields to it in loaders, actions, or middleware. ([#14097](https://github.com/remix-run/react-router/pull/14097)) - \[UNSTABLE] Rename and alter the signature/functionality of the `unstable_respond` API in `staticHandler.query`/`staticHandler.queryRoute` ([#14103](https://github.com/remix-run/react-router/pull/14103)) - - 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) => Promise` @@ -1057,7 +1050,6 @@ ``` Similar to server-side requests, a fresh `context` will be created per navigation (or `fetcher` call). If you have initial data you'd like to populate in the context for every request, you can provide an `unstable_getContext` function at the root of your app: - - Library mode - `createBrowserRouter(routes, { unstable_getContext })` - Framework mode - `` @@ -1245,7 +1237,6 @@ _No changes_ - Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697)) - For Remix consumers migrating to React Router, the `crypto` global from the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API) is now required when using cookie and session APIs. This means that the following APIs are provided from `react-router` rather than platform-specific packages: ([#11837](https://github.com/remix-run/react-router/pull/11837)) - - `createCookie` - `createCookieSessionStorage` - `createMemorySessionStorage` @@ -1254,7 +1245,6 @@ _No changes_ For consumers running older versions of Node, the `installGlobals` function from `@remix-run/node` has been updated to define `globalThis.crypto`, using [Node's `require('node:crypto').webcrypto` implementation.](https://nodejs.org/api/webcrypto.html) Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed: - - `createCookieFactory` - `createSessionStorageFactory` - `createCookieSessionStorageFactory` @@ -1410,7 +1400,6 @@ _No changes_ ``` This initial implementation targets type inference for: - - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module - `ActionData` : Action data from `action` and/or `clientAction` within your route module @@ -1425,7 +1414,6 @@ _No changes_ ``` Check out our docs for more: - - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety) - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)