react-router 7.9.1-pre.0 → 7.9.1

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-T2FO7LZR.mjs → chunk-B7RQU5TL.mjs} +2 -2
  3. package/dist/{production/chunk-QSAZM6H2.js → development/chunk-LWNHKVDL.js} +131 -131
  4. package/dist/development/{chunk-XGGFIIA6.js → chunk-PW3F6ATG.js} +1 -1
  5. package/dist/{production/chunk-CYDGAKF3.mjs → development/chunk-SKNKB5VI.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 +96 -96
  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/{development/chunk-XMMS4S5U.js → production/chunk-3SXVZXGI.js} +131 -131
  17. package/dist/production/{chunk-CQNGOQ3L.js → chunk-HMYSPRGR.js} +1 -1
  18. package/dist/production/{chunk-NVD2TNOP.mjs → chunk-P25HWPOZ.mjs} +2 -2
  19. package/dist/{development/chunk-Y3WUXTM5.mjs → production/chunk-RCAZODXZ.mjs} +2 -2
  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 +96 -96
  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.1-pre.0
3
+ ## 7.9.1
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -13,6 +13,7 @@
13
13
  - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
14
14
 
15
15
  We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
16
+
16
17
  - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
17
18
  - [`createContext`](https://reactrouter.com/api/utils/createContext)
18
19
  - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
@@ -39,7 +40,7 @@
39
40
 
40
41
  - \[UNSTABLE] Add `<RouterProvider unstable_onError>`/`<HydratedRouter unstable_onError>` prop for client side error reporting ([#14162](https://github.com/remix-run/react-router/pull/14162))
41
42
 
42
- - server action revalidation opt out via $SKIP_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
43
+ - server action revalidation opt out via $SKIP\_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
43
44
 
44
45
  - Properly escape interpolated param values in `generatePath()` ([#13530](https://github.com/remix-run/react-router/pull/13530))
45
46
 
@@ -88,6 +89,7 @@
88
89
  - Remove dependency on `@types/node` in TypeScript declaration files ([#14059](https://github.com/remix-run/react-router/pull/14059))
89
90
 
90
91
  - Fix types for `UIMatch` to reflect that the `loaderData`/`data` properties may be `undefined` ([#12206](https://github.com/remix-run/react-router/pull/12206))
92
+
91
93
  - 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
92
94
  - 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
93
95
  - ⚠️ 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.
@@ -121,6 +123,7 @@
121
123
  - \[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))
122
124
 
123
125
  - \[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))
126
+
124
127
  - The API has been renamed to `unstable_generateMiddlewareResponse` for clarity
125
128
  - 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
126
129
  - The `query` version of the API now has a signature of `(query: (r: Request) => Promise<StaticHandlerContext | Response>) => Promise<Response>`
@@ -766,6 +769,7 @@
766
769
  ```
767
770
 
768
771
  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:
772
+
769
773
  - Library mode - `createBrowserRouter(routes, { unstable_getContext })`
770
774
  - Framework mode - `<HydratedRouter unstable_getContext>`
771
775
 
@@ -953,6 +957,7 @@ _No changes_
953
957
  - Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697))
954
958
 
955
959
  - 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))
960
+
956
961
  - `createCookie`
957
962
  - `createCookieSessionStorage`
958
963
  - `createMemorySessionStorage`
@@ -961,6 +966,7 @@ _No changes_
961
966
  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)
962
967
 
963
968
  Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
969
+
964
970
  - `createCookieFactory`
965
971
  - `createSessionStorageFactory`
966
972
  - `createCookieSessionStorageFactory`
@@ -1116,6 +1122,7 @@ _No changes_
1116
1122
  ```
1117
1123
 
1118
1124
  This initial implementation targets type inference for:
1125
+
1119
1126
  - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
1120
1127
  - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
1121
1128
  - `ActionData` : Action data from `action` and/or `clientAction` within your route module
@@ -1130,6 +1137,7 @@ _No changes_
1130
1137
  ```
1131
1138
 
1132
1139
  Check out our docs for more:
1140
+
1133
1141
  - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
1134
1142
  - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
1135
1143
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.9.1-pre.0
2
+ * react-router v7.9.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -8964,7 +8964,7 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
8964
8964
  try {
8965
8965
  if (isBrowser) {
8966
8966
  window.__reactRouterVersion = // @ts-expect-error
8967
- "7.9.1-pre.0";
8967
+ "7.9.1";
8968
8968
  }
8969
8969
  } catch (e) {
8970
8970
  }