react-router 7.9.4-pre.0 → 7.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/dist/development/{chunk-JPM6TDKY.js → chunk-72XNTZCV.js} +134 -134
  3. package/dist/development/{chunk-V7H6ON6M.js → chunk-DI2QHYMJ.js} +1 -1
  4. package/dist/development/{chunk-I2PHXWY4.mjs → chunk-OIYGIGL5.mjs} +2 -2
  5. package/dist/development/{chunk-5IRCOFJ2.mjs → chunk-WY5IRSCW.mjs} +2 -2
  6. package/dist/development/dom-export.js +3 -3
  7. package/dist/development/dom-export.mjs +3 -3
  8. package/dist/development/index-react-server-client.js +4 -4
  9. package/dist/development/index-react-server-client.mjs +2 -2
  10. package/dist/development/index-react-server.js +1 -1
  11. package/dist/development/index-react-server.mjs +1 -1
  12. package/dist/development/index.js +97 -97
  13. package/dist/development/index.mjs +3 -3
  14. package/dist/development/lib/types/internal.js +1 -1
  15. package/dist/development/lib/types/internal.mjs +1 -1
  16. package/dist/production/{chunk-VDTQF36D.mjs → chunk-3TADTUL4.mjs} +2 -2
  17. package/dist/production/{chunk-QIDCISSR.js → chunk-4E5LHRQP.js} +1 -1
  18. package/dist/production/{chunk-TK5RYV7M.mjs → chunk-FR6HSPLK.mjs} +2 -2
  19. package/dist/production/{chunk-A4C524Z4.js → chunk-WNLQ53P5.js} +134 -134
  20. package/dist/production/dom-export.js +3 -3
  21. package/dist/production/dom-export.mjs +3 -3
  22. package/dist/production/index-react-server-client.js +4 -4
  23. package/dist/production/index-react-server-client.mjs +2 -2
  24. package/dist/production/index-react-server.js +1 -1
  25. package/dist/production/index-react-server.mjs +1 -1
  26. package/dist/production/index.js +97 -97
  27. package/dist/production/index.mjs +3 -3
  28. package/dist/production/lib/types/internal.js +1 -1
  29. package/dist/production/lib/types/internal.mjs +1 -1
  30. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.9.4-pre.0
3
+ ## 7.9.4
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -153,6 +153,7 @@
153
153
  - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
154
154
 
155
155
  We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
156
+
156
157
  - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
157
158
  - [`createContext`](https://reactrouter.com/api/utils/createContext)
158
159
  - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
@@ -179,7 +180,7 @@
179
180
 
180
181
  - \[UNSTABLE] Add `<RouterProvider unstable_onError>`/`<HydratedRouter unstable_onError>` prop for client side error reporting ([#14162](https://github.com/remix-run/react-router/pull/14162))
181
182
 
182
- - server action revalidation opt out via $SKIP_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
183
+ - server action revalidation opt out via $SKIP\_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
183
184
 
184
185
  - Properly escape interpolated param values in `generatePath()` ([#13530](https://github.com/remix-run/react-router/pull/13530))
185
186
 
@@ -228,6 +229,7 @@
228
229
  - Remove dependency on `@types/node` in TypeScript declaration files ([#14059](https://github.com/remix-run/react-router/pull/14059))
229
230
 
230
231
  - Fix types for `UIMatch` to reflect that the `loaderData`/`data` properties may be `undefined` ([#12206](https://github.com/remix-run/react-router/pull/12206))
232
+
231
233
  - 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
232
234
  - 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
233
235
  - ⚠️ 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.
@@ -261,6 +263,7 @@
261
263
  - \[UNSTABLE] When middleware is enabled, make the `context` parameter read-only (via `Readonly<unstable_RouterContextProvider>`) 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))
262
264
 
263
265
  - \[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))
266
+
264
267
  - The API has been renamed to `unstable_generateMiddlewareResponse` for clarity
265
268
  - 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
266
269
  - The `query` version of the API now has a signature of `(query: (r: Request) => Promise<StaticHandlerContext | Response>) => Promise<Response>`
@@ -906,6 +909,7 @@
906
909
  ```
907
910
 
908
911
  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:
912
+
909
913
  - Library mode - `createBrowserRouter(routes, { unstable_getContext })`
910
914
  - Framework mode - `<HydratedRouter unstable_getContext>`
911
915
 
@@ -1093,6 +1097,7 @@ _No changes_
1093
1097
  - Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697))
1094
1098
 
1095
1099
  - 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))
1100
+
1096
1101
  - `createCookie`
1097
1102
  - `createCookieSessionStorage`
1098
1103
  - `createMemorySessionStorage`
@@ -1101,6 +1106,7 @@ _No changes_
1101
1106
  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)
1102
1107
 
1103
1108
  Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
1109
+
1104
1110
  - `createCookieFactory`
1105
1111
  - `createSessionStorageFactory`
1106
1112
  - `createCookieSessionStorageFactory`
@@ -1256,6 +1262,7 @@ _No changes_
1256
1262
  ```
1257
1263
 
1258
1264
  This initial implementation targets type inference for:
1265
+
1259
1266
  - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
1260
1267
  - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
1261
1268
  - `ActionData` : Action data from `action` and/or `clientAction` within your route module
@@ -1270,6 +1277,7 @@ _No changes_
1270
1277
  ```
1271
1278
 
1272
1279
  Check out our docs for more:
1280
+
1273
1281
  - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
1274
1282
  - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
1275
1283