react-router 7.9.0-pre.1 → 7.9.0

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 +11 -8
  2. package/dist/development/{chunk-AVXIT45F.mjs → chunk-AKKEMMKB.mjs} +2 -2
  3. package/dist/development/{chunk-QZH3B547.mjs → chunk-S5YDGZLY.mjs} +2 -2
  4. package/dist/development/{chunk-XYB2GISA.js → chunk-UGCJQSTX.js} +131 -131
  5. package/dist/development/{chunk-RGB6BZUL.js → chunk-VHEBI3C5.js} +1 -1
  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/production/{chunk-IR3XRH6J.js → chunk-HDA5IKPB.js} +131 -131
  17. package/dist/production/{chunk-BQLQLXP4.mjs → chunk-MOZTWV63.mjs} +2 -2
  18. package/dist/production/{chunk-A6EU7LHU.js → chunk-VNPMQDPD.js} +1 -1
  19. package/dist/production/{chunk-WMHWIEJV.mjs → chunk-WOZJCBVO.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,18 +1,13 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.9.0-pre.1
4
-
5
- ### Patch Changes
6
-
7
- - Escape HTML in `meta()` JSON-LD content ([#14316](https://github.com/remix-run/react-router/pull/14316))
8
-
9
- ## 7.9.0-pre.0
3
+ ## 7.9.0
10
4
 
11
5
  ### Minor Changes
12
6
 
13
7
  - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
14
8
 
15
9
  We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
10
+
16
11
  - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
17
12
  - [`createContext`](https://reactrouter.com/api/utils/createContext)
18
13
  - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
@@ -22,6 +17,7 @@
22
17
 
23
18
  ### Patch Changes
24
19
 
20
+ - Escape HTML in `meta()` JSON-LD content ([#14316](https://github.com/remix-run/react-router/pull/14316))
25
21
  - Add react-server Await component implementation ([#14261](https://github.com/remix-run/react-router/pull/14261))
26
22
  - In RSC Data Mode when using a custom basename, fix hydration errors for routes that only have client loaders ([#14264](https://github.com/remix-run/react-router/pull/14264))
27
23
  - Make `href` function available in a react-server context ([#14262](https://github.com/remix-run/react-router/pull/14262))
@@ -38,7 +34,7 @@
38
34
 
39
35
  - \[UNSTABLE] Add `<RouterProvider unstable_onError>`/`<HydratedRouter unstable_onError>` prop for client side error reporting ([#14162](https://github.com/remix-run/react-router/pull/14162))
40
36
 
41
- - server action revalidation opt out via $SKIP_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
37
+ - server action revalidation opt out via $SKIP\_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
42
38
 
43
39
  - Properly escape interpolated param values in `generatePath()` ([#13530](https://github.com/remix-run/react-router/pull/13530))
44
40
 
@@ -87,6 +83,7 @@
87
83
  - Remove dependency on `@types/node` in TypeScript declaration files ([#14059](https://github.com/remix-run/react-router/pull/14059))
88
84
 
89
85
  - Fix types for `UIMatch` to reflect that the `loaderData`/`data` properties may be `undefined` ([#12206](https://github.com/remix-run/react-router/pull/12206))
86
+
90
87
  - 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
91
88
  - 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
92
89
  - ⚠️ 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.
@@ -120,6 +117,7 @@
120
117
  - \[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))
121
118
 
122
119
  - \[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))
120
+
123
121
  - The API has been renamed to `unstable_generateMiddlewareResponse` for clarity
124
122
  - 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
125
123
  - The `query` version of the API now has a signature of `(query: (r: Request) => Promise<StaticHandlerContext | Response>) => Promise<Response>`
@@ -765,6 +763,7 @@
765
763
  ```
766
764
 
767
765
  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:
766
+
768
767
  - Library mode - `createBrowserRouter(routes, { unstable_getContext })`
769
768
  - Framework mode - `<HydratedRouter unstable_getContext>`
770
769
 
@@ -952,6 +951,7 @@ _No changes_
952
951
  - Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697))
953
952
 
954
953
  - 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))
954
+
955
955
  - `createCookie`
956
956
  - `createCookieSessionStorage`
957
957
  - `createMemorySessionStorage`
@@ -960,6 +960,7 @@ _No changes_
960
960
  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)
961
961
 
962
962
  Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
963
+
963
964
  - `createCookieFactory`
964
965
  - `createSessionStorageFactory`
965
966
  - `createCookieSessionStorageFactory`
@@ -1115,6 +1116,7 @@ _No changes_
1115
1116
  ```
1116
1117
 
1117
1118
  This initial implementation targets type inference for:
1119
+
1118
1120
  - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
1119
1121
  - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
1120
1122
  - `ActionData` : Action data from `action` and/or `clientAction` within your route module
@@ -1129,6 +1131,7 @@ _No changes_
1129
1131
  ```
1130
1132
 
1131
1133
  Check out our docs for more:
1134
+
1132
1135
  - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
1133
1136
  - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
1134
1137
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.9.0-pre.1
2
+ * react-router v7.9.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -59,7 +59,7 @@ import {
59
59
  withComponentProps,
60
60
  withErrorBoundaryProps,
61
61
  withHydrateFallbackProps
62
- } from "./chunk-QZH3B547.mjs";
62
+ } from "./chunk-S5YDGZLY.mjs";
63
63
 
64
64
  // lib/dom/ssr/server.tsx
65
65
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.9.0-pre.1
2
+ * react-router v7.9.0
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.0-pre.1";
8967
+ "7.9.0";
8968
8968
  }
8969
8969
  } catch (e) {
8970
8970
  }