diff --git a/.changeset/cold-schools-relate.md b/.changeset/cold-schools-relate.md deleted file mode 100644 index d45d6f8fb1..0000000000 --- a/.changeset/cold-schools-relate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Fix clientLoader.hydrate when an ancestor route is also hydrating a clientLoader diff --git a/.changeset/fix-createRoutesStub-component-type.md b/.changeset/fix-createRoutesStub-component-type.md deleted file mode 100644 index 2c604a85b7..0000000000 --- a/.changeset/fix-createRoutesStub-component-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Fix type error when passing Framework Mode route components using `Route.ComponentProps` to `createRoutesStub` diff --git a/.changeset/fix-dev-socket-file-crash.md b/.changeset/fix-dev-socket-file-crash.md deleted file mode 100644 index f33ce09bcb..0000000000 --- a/.changeset/fix-dev-socket-file-crash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/dev": patch ---- - -Fix `react-router dev` crash when Unix socket files exist in the project root diff --git a/.changeset/gentle-doors-visit.md b/.changeset/gentle-doors-visit.md deleted file mode 100644 index c35f888597..0000000000 --- a/.changeset/gentle-doors-visit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Fix percent encoding in relative path navigation diff --git a/.changeset/kind-shirts-turn.md b/.changeset/kind-shirts-turn.md deleted file mode 100644 index dc26b6af24..0000000000 --- a/.changeset/kind-shirts-turn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@react-router/dev": patch ---- - -Escape redirect locations in prerendered redirect HTML diff --git a/.changeset/passthrough-reqeusts.md b/.changeset/passthrough-reqeusts.md deleted file mode 100644 index a466f7ec0e..0000000000 --- a/.changeset/passthrough-reqeusts.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -"@react-router/dev": patch -"react-router": patch ---- - -Add `future.unstable_passThroughRequests` flag - -By default, React Router normalizes the `request.url` passed to your `loader`, `action`, and `middleware` functions by removing React Router's internal implementation details (`.data` suffixes, `index` + `_routes` query params). - -Enabling this flag removes that normalization and passes the raw HTTP `request` instance to your handlers. This provides a few benefits: - -- Reduces server-side overhead by eliminating multiple `new Request()` calls on the critical path -- Allows you to distinguish document from data requests in your handlers base don the presence of a `.data` suffix (useful for observability purposes) - -If you were previously relying on the normalization of `request.url`, you can switch to use the new sibling `unstable_url` parameter which contains a `URL` instance representing the normalized location: - -```tsx -// ❌ Before: you could assume there was no `.data` suffix in `request.url` -export async function loader({ request }: Route.LoaderArgs) { - let url = new URL(request.url); - if (url.pathname === "/path") { - // This check will fail with the flag enabled because the `.data` suffix will - // exist on data requests - } -} - -// ✅ After: use `unstable_url` for normalized routing logic and `request.url` -// for raw routing logic -export async function loader({ request, unstable_url }: Route.LoaderArgs) { - if (unstable_url.pathname === "/path") { - // This will always have the `.data` suffix stripped - } - - // And now you can distinguish between document versus data requests - let isDataRequest = new URL(request.url).pathname.endsWith(".data"); -} -``` diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 0d584e1ae1..0000000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "mode": "exit", - "tag": "pre", - "initialVersions": { - "integration": "0.0.0", - "integration-cloudflare-dev-proxy-template": "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.13.1", - "react-router": "7.13.1", - "@react-router/architect": "7.13.1", - "@react-router/cloudflare": "7.13.1", - "@react-router/dev": "7.13.1", - "react-router-dom": "7.13.1", - "@react-router/express": "7.13.1", - "@react-router/fs-routes": "7.13.1", - "@react-router/node": "7.13.1", - "@react-router/remix-routes-option-adapter": "7.13.1", - "@react-router/serve": "7.13.1", - "@playground/data": "0.0.0", - "@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-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": [ - "cold-schools-relate", - "fix-createRoutesStub-component-type", - "fix-dev-socket-file-crash", - "gentle-doors-visit", - "kind-shirts-turn", - "passthrough-reqeusts", - "remove-agnostic-types", - "sweet-houses-kick", - "twelve-snails-wait", - "unstable-url" - ] -} diff --git a/.changeset/remove-agnostic-types.md b/.changeset/remove-agnostic-types.md deleted file mode 100644 index 268c8f3fb5..0000000000 --- a/.changeset/remove-agnostic-types.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Internal refactor to consolidate framework-agnostic/React-specific route type layers - no public API changes diff --git a/.changeset/sweet-houses-kick.md b/.changeset/sweet-houses-kick.md deleted file mode 100644 index daeca90ffd..0000000000 --- a/.changeset/sweet-houses-kick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"create-react-router": patch ---- - -chore: replace chalk with picocolors diff --git a/.changeset/twelve-snails-wait.md b/.changeset/twelve-snails-wait.md deleted file mode 100644 index 02bf3f77f6..0000000000 --- a/.changeset/twelve-snails-wait.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"react-router": patch ---- - -Sync protocol validation to rsc flows diff --git a/.changeset/unstable-url.md b/.changeset/unstable-url.md deleted file mode 100644 index 77b7d1ad12..0000000000 --- a/.changeset/unstable-url.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@react-router/dev": patch -"react-router": patch ---- - -Add a new `unstable_url: URL` parameter to route handler methods (`loader`, `action`, `middleware`, etc.) representing the normalized URL the application is navigating to or fetching, with React Router implementation details removed (`.data`suffix, `index`/`_routes` query params) - -This is being added alongside the new `future.unstable_passthroughRequests` future flag so that users still have a way to access the normalized URL when that flag is enabled and non-normalized `request`'s are being passed to your handlers. When adopting this flag, you will only need to start leveraging this new parameter if you are relying on the normalization of `request.url` in your application code. - -If you don't have the flag enabled, then `unstable_url` will match `request.url`. 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 cae5c8d6b2..4f7c02a71c 100644 --- a/packages/create-react-router/CHANGELOG.md +++ b/packages/create-react-router/CHANGELOG.md @@ -1,6 +1,6 @@ # `create-react-router` -## 7.13.2-pre.0 +## 7.13.2 ### Patch Changes diff --git a/packages/create-react-router/package.json b/packages/create-react-router/package.json index 806d81a411..8aa481a8a5 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.13.2-pre.0", + "version": "7.13.2", "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 33032786c6..7067f24c9c 100644 --- a/packages/react-router-architect/CHANGELOG.md +++ b/packages/react-router-architect/CHANGELOG.md @@ -1,12 +1,12 @@ # `@react-router/architect` -## 7.13.2-pre.0 +## 7.13.2 ### Patch Changes - Updated dependencies: - - `react-router@7.13.2-pre.0` - - `@react-router/node@7.13.2-pre.0` + - `react-router@7.13.2` + - `@react-router/node@7.13.2` ## 7.13.1 @@ -111,6 +111,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 @@ -334,6 +335,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` @@ -342,6 +344,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 ea9202f8f9..eee863494e 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.13.2-pre.0", + "version": "7.13.2", "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 3de75e1099..16deaeb33a 100644 --- a/packages/react-router-cloudflare/CHANGELOG.md +++ b/packages/react-router-cloudflare/CHANGELOG.md @@ -1,11 +1,11 @@ # `@react-router/cloudflare` -## 7.13.2-pre.0 +## 7.13.2 ### Patch Changes - Updated dependencies: - - `react-router@7.13.2-pre.0` + - `react-router@7.13.2` ## 7.13.1 @@ -98,6 +98,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 @@ -296,6 +297,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` @@ -304,6 +306,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 6d3763e081..6630574b8a 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.13.2-pre.0", + "version": "7.13.2", "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 171cc70d21..5d2cf4b88b 100644 --- a/packages/react-router-dev/CHANGELOG.md +++ b/packages/react-router-dev/CHANGELOG.md @@ -1,16 +1,19 @@ # `@react-router/dev` -## 7.13.2-pre.0 +## 7.13.2 ### Patch Changes - Fix `react-router dev` crash when Unix socket files exist in the project root ([#14854](https://github.com/remix-run/react-router/pull/14854)) + - Escape redirect locations in prerendered redirect HTML ([#14880](https://github.com/remix-run/react-router/pull/14880)) + - Add `future.unstable_passThroughRequests` flag ([#14775](https://github.com/remix-run/react-router/pull/14775)) By default, React Router normalizes the `request.url` passed to your `loader`, `action`, and `middleware` functions by removing React Router's internal implementation details (`.data` suffixes, `index` + `_routes` query params). Enabling this flag removes that normalization and passes the raw HTTP `request` instance to your handlers. This provides a few benefits: + - Reduces server-side overhead by eliminating multiple `new Request()` calls on the critical path - Allows you to distinguish document from data requests in your handlers base don the presence of a `.data` suffix (useful for observability purposes) @@ -45,9 +48,9 @@ If you don't have the flag enabled, then `unstable_url` will match `request.url`. - Updated dependencies: - - `react-router@7.13.2-pre.0` - - `@react-router/node@7.13.2-pre.0` - - `@react-router/serve@7.13.2-pre.0` + - `react-router@7.13.2` + - `@react-router/node@7.13.2` + - `@react-router/serve@7.13.2` ## 7.13.1 @@ -86,25 +89,25 @@ | URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** | | ------------ | ----------------- | ------------------------ | - | **Document** | `/a/b/c` | `/a/b/c` ✅ | - | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | + | **Document** | `/a/b/c` | `/a/b/c` ✅ | + | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | | URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** | | ------------- | ----------------- | ------------------------ | - | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | + | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | | **Data** | `/a/b/c.data` | `/a/b/c` ⚠️ | With this flag enabled, these pathnames will be made consistent though a new `_.data` format for client-side `.data` requests: | URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** | | ------------ | ----------------- | ------------------------ | - | **Document** | `/a/b/c` | `/a/b/c` ✅ | - | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | + | **Document** | `/a/b/c` | `/a/b/c` ✅ | + | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | | URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** | | ------------- | ------------------ | ------------------------ | - | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | - | **Data** | `/a/b/c/_.data` ⬅️ | `/a/b/c/` ✅ | + | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | + | **Data** | `/a/b/c/_.data` ⬅️ | `/a/b/c/` ✅ | This a bug fix but we are putting it behind an opt-in flag because it has the potential to be a "breaking bug fix" if you are relying on the URL format for any other application or caching logic. @@ -362,6 +365,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 @@ -1104,6 +1108,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 @@ -1118,6 +1123,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) @@ -1317,6 +1323,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` @@ -1653,6 +1660,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 @@ -2056,6 +2064,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) @@ -2153,6 +2162,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 @@ -2423,6 +2433,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 f14ce676fb..071d382389 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.13.2-pre.0", + "version": "7.13.2", "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 9ea29e92ef..cc18319f99 100644 --- a/packages/react-router-dom/CHANGELOG.md +++ b/packages/react-router-dom/CHANGELOG.md @@ -1,11 +1,11 @@ # react-router-dom -## 7.13.2-pre.0 +## 7.13.2 ### Patch Changes - Updated dependencies: - - `react-router@7.13.2-pre.0` + - `react-router@7.13.2` ## 7.13.1 diff --git a/packages/react-router-dom/package.json b/packages/react-router-dom/package.json index 10bd5aae0c..78ff090a7a 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.13.2-pre.0", + "version": "7.13.2", "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 457466f26f..20f4677eaa 100644 --- a/packages/react-router-express/CHANGELOG.md +++ b/packages/react-router-express/CHANGELOG.md @@ -1,12 +1,12 @@ # `@react-router/express` -## 7.13.2-pre.0 +## 7.13.2 ### Patch Changes - Updated dependencies: - - `react-router@7.13.2-pre.0` - - `@react-router/node@7.13.2-pre.0` + - `react-router@7.13.2` + - `@react-router/node@7.13.2` ## 7.13.1 @@ -111,6 +111,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 9a43a2a13b..74cf7546dd 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.13.2-pre.0", + "version": "7.13.2", "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 6000d21fff..430d52e93d 100644 --- a/packages/react-router-fs-routes/CHANGELOG.md +++ b/packages/react-router-fs-routes/CHANGELOG.md @@ -1,11 +1,11 @@ # `@react-router/fs-routes` -## 7.13.2-pre.0 +## 7.13.2 ### Patch Changes - Updated dependencies: - - `@react-router/dev@7.13.2-pre.0` + - `@react-router/dev@7.13.2` ## 7.13.1 diff --git a/packages/react-router-fs-routes/package.json b/packages/react-router-fs-routes/package.json index 8d56df5caf..a07087298d 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.13.2-pre.0", + "version": "7.13.2", "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 178fe460b2..f99a5dcb16 100644 --- a/packages/react-router-node/CHANGELOG.md +++ b/packages/react-router-node/CHANGELOG.md @@ -1,11 +1,11 @@ # `@react-router/node` -## 7.13.2-pre.0 +## 7.13.2 ### Patch Changes - Updated dependencies: - - `react-router@7.13.2-pre.0` + - `react-router@7.13.2` ## 7.13.1 @@ -99,6 +99,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 @@ -298,6 +299,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` @@ -306,6 +308,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` @@ -713,10 +716,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 0ee228f56b..503e94a189 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.13.2-pre.0", + "version": "7.13.2", "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 508bbc3ef8..b26491c899 100644 --- a/packages/react-router-remix-routes-option-adapter/CHANGELOG.md +++ b/packages/react-router-remix-routes-option-adapter/CHANGELOG.md @@ -1,11 +1,11 @@ # `@react-router/remix-config-routes-adapter` -## 7.13.2-pre.0 +## 7.13.2 ### Patch Changes - Updated dependencies: - - `@react-router/dev@7.13.2-pre.0` + - `@react-router/dev@7.13.2` ## 7.13.1 diff --git a/packages/react-router-remix-routes-option-adapter/package.json b/packages/react-router-remix-routes-option-adapter/package.json index 41ee7ab6ec..2228e95656 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.13.2-pre.0", + "version": "7.13.2", "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 a9820877d9..34dd0abf67 100644 --- a/packages/react-router-serve/CHANGELOG.md +++ b/packages/react-router-serve/CHANGELOG.md @@ -1,13 +1,13 @@ # `@react-router/serve` -## 7.13.2-pre.0 +## 7.13.2 ### Patch Changes - Updated dependencies: - - `react-router@7.13.2-pre.0` - - `@react-router/node@7.13.2-pre.0` - - `@react-router/express@7.13.2-pre.0` + - `react-router@7.13.2` + - `@react-router/node@7.13.2` + - `@react-router/express@7.13.2` ## 7.13.1 @@ -737,10 +737,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 b9a5200b7d..0b59a2e4a4 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.13.2-pre.0", + "version": "7.13.2", "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 66f55ffbf5..2f55fd94f7 100644 --- a/packages/react-router/CHANGELOG.md +++ b/packages/react-router/CHANGELOG.md @@ -1,17 +1,21 @@ # `react-router` -## 7.13.2-pre.0 +## 7.13.2 ### Patch Changes - Fix clientLoader.hydrate when an ancestor route is also hydrating a clientLoader ([#14835](https://github.com/remix-run/react-router/pull/14835)) + - Fix type error when passing Framework Mode route components using `Route.ComponentProps` to `createRoutesStub` ([#14892](https://github.com/remix-run/react-router/pull/14892)) + - Fix percent encoding in relative path navigation ([#14786](https://github.com/remix-run/react-router/pull/14786)) + - Add `future.unstable_passThroughRequests` flag ([#14775](https://github.com/remix-run/react-router/pull/14775)) By default, React Router normalizes the `request.url` passed to your `loader`, `action`, and `middleware` functions by removing React Router's internal implementation details (`.data` suffixes, `index` + `_routes` query params). Enabling this flag removes that normalization and passes the raw HTTP `request` instance to your handlers. This provides a few benefits: + - Reduces server-side overhead by eliminating multiple `new Request()` calls on the critical path - Allows you to distinguish document from data requests in your handlers base don the presence of a `.data` suffix (useful for observability purposes) @@ -40,7 +44,9 @@ ``` - Internal refactor to consolidate framework-agnostic/React-specific route type layers - no public API changes ([#14765](https://github.com/remix-run/react-router/pull/14765)) + - Sync protocol validation to rsc flows ([#14882](https://github.com/remix-run/react-router/pull/14882)) + - Add a new `unstable_url: URL` parameter to route handler methods (`loader`, `action`, `middleware`, etc.) representing the normalized URL the application is navigating to or fetching, with React Router implementation details removed (`.data`suffix, `index`/`_routes` query params) ([#14775](https://github.com/remix-run/react-router/pull/14775)) This is being added alongside the new `future.unstable_passthroughRequests` future flag so that users still have a way to access the normalized URL when that flag is enabled and non-normalized `request`'s are being passed to your handlers. When adopting this flag, you will only need to start leveraging this new parameter if you are relying on the normalization of `request.url` in your application code. @@ -59,9 +65,9 @@ - Fix matchPath optional params matching without a "/" separator. ([#14689](https://github.com/remix-run/react-router/pull/14689)) - matchPath("/users/:id?", "/usersblah") now returns null. - - matchPath("/test_route/:part?", "/test_route_more") now returns null. + - matchPath("/test\_route/:part?", "/test\_route\_more") now returns null. -- add RSC unstable_getRequest ([#14758](https://github.com/remix-run/react-router/pull/14758)) +- add RSC unstable\_getRequest ([#14758](https://github.com/remix-run/react-router/pull/14758)) - Fix `HydrateFallback` rendering during initial lazy route discovery with matching splat route ([#14740](https://github.com/remix-run/react-router/pull/14740)) @@ -107,6 +113,7 @@ ``` Notes: + - The masked location, if present, will be available on `useLocation().unstable_mask` so you can detect whether you are currently masked or not. - Masked URLs only work for SPA use cases, and will be removed from `history.state` during SSR. - This provides a first-class API to mask URLs in Data Mode to achieve the same behavior you could do in Declarative Mode via [manual `backgroundLocation` management](https://github.com/remix-run/react-router/tree/main/examples/modal). @@ -152,25 +159,25 @@ | URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** | | ------------ | ----------------- | ------------------------ | - | **Document** | `/a/b/c` | `/a/b/c` ✅ | - | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | + | **Document** | `/a/b/c` | `/a/b/c` ✅ | + | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | | URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** | | ------------- | ----------------- | ------------------------ | - | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | + | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | | **Data** | `/a/b/c.data` | `/a/b/c` ⚠️ | With this flag enabled, these pathnames will be made consistent though a new `_.data` format for client-side `.data` requests: | URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** | | ------------ | ----------------- | ------------------------ | - | **Document** | `/a/b/c` | `/a/b/c` ✅ | - | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | + | **Document** | `/a/b/c` | `/a/b/c` ✅ | + | **Data** | `/a/b/c.data` | `/a/b/c` ✅ | | URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** | | ------------- | ------------------ | ------------------------ | - | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | - | **Data** | `/a/b/c/_.data` ⬅️ | `/a/b/c/` ✅ | + | **Document** | `/a/b/c/` | `/a/b/c/` ✅ | + | **Data** | `/a/b/c/_.data` ⬅️ | `/a/b/c/` ✅ | This a bug fix but we are putting it behind an opt-in flag because it has the potential to be a "breaking bug fix" if you are relying on the URL format for any other application or caching logic. @@ -197,12 +204,14 @@ - \[UNSTABLE] Add a new `unstable_defaultShouldRevalidate` flag to various APIs to allow opt-ing out of standard revalidation behaviors. ([#14542](https://github.com/remix-run/react-router/pull/14542)) If active routes include a `shouldRevalidate` function, then your value will be passed as `defaultShouldRevalidate` in those function so that the route always has the final revalidation determination. + - `
` - `submit(data, { method: "post", unstable_defaultShouldRevalidate: false })` - `` - `fetcher.submit(data, { method: "post", unstable_defaultShouldRevalidate: false })` This is also available on non-submission APIs that may trigger revalidations due to changing search params: + - `` - `navigate("/?foo=bar", { unstable_defaultShouldRevalidate: false })` - `setSearchParams(params, { unstable_defaultShouldRevalidate: false })` @@ -225,6 +234,7 @@ - ⚠️ 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: @@ -353,6 +363,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`: `` @@ -514,6 +525,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 @@ -540,7 +552,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)) @@ -589,6 +601,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. @@ -622,6 +635,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` @@ -1267,6 +1281,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 - `` @@ -1454,6 +1469,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` @@ -1462,6 +1478,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` @@ -1617,6 +1634,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 @@ -1631,6 +1649,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 7931ddba9a..7cb1a1e999 100644 --- a/packages/react-router/package.json +++ b/packages/react-router/package.json @@ -1,6 +1,6 @@ { "name": "react-router", - "version": "7.13.2-pre.0", + "version": "7.13.2", "description": "Declarative routing for React", "keywords": [ "react",