react-router 7.9.3-pre.0 → 7.9.3
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.
- package/CHANGELOG.md +10 -2
- package/dist/development/{chunk-HHJJZWWP.mjs → chunk-65XJMMLO.mjs} +2 -2
- package/dist/development/{chunk-MREZ7GBS.js → chunk-EUCGRVHH.js} +134 -134
- package/dist/development/{chunk-OUSD3CXG.js → chunk-LZYTN6SO.js} +1 -1
- package/dist/development/{chunk-TZREDCP7.mjs → chunk-NISHYRIK.mjs} +2 -2
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.js +1 -1
- package/dist/development/index-react-server.mjs +1 -1
- package/dist/development/index.js +97 -97
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{chunk-AR4BV4G2.js → chunk-GWORLVRM.js} +1 -1
- package/dist/production/{chunk-YE2RU2Y2.js → chunk-LHDU32KO.js} +134 -134
- package/dist/production/{chunk-ZS4K3BVQ.mjs → chunk-LI6FX3G6.mjs} +2 -2
- package/dist/production/{chunk-RX77WZIY.mjs → chunk-VAVG4EWR.mjs} +2 -2
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.js +1 -1
- package/dist/production/index-react-server.mjs +1 -1
- package/dist/production/index.js +97 -97
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
-
## 7.9.3
|
|
3
|
+
## 7.9.3
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
|
|
49
49
|
|
|
50
50
|
We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
|
|
51
|
+
|
|
51
52
|
- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
|
|
52
53
|
- [`createContext`](https://reactrouter.com/api/utils/createContext)
|
|
53
54
|
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
|
|
75
76
|
- \[UNSTABLE] Add `<RouterProvider unstable_onError>`/`<HydratedRouter unstable_onError>` prop for client side error reporting ([#14162](https://github.com/remix-run/react-router/pull/14162))
|
|
76
77
|
|
|
77
|
-
- server action revalidation opt out via $
|
|
78
|
+
- server action revalidation opt out via $SKIP\_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
|
|
78
79
|
|
|
79
80
|
- Properly escape interpolated param values in `generatePath()` ([#13530](https://github.com/remix-run/react-router/pull/13530))
|
|
80
81
|
|
|
@@ -123,6 +124,7 @@
|
|
|
123
124
|
- Remove dependency on `@types/node` in TypeScript declaration files ([#14059](https://github.com/remix-run/react-router/pull/14059))
|
|
124
125
|
|
|
125
126
|
- Fix types for `UIMatch` to reflect that the `loaderData`/`data` properties may be `undefined` ([#12206](https://github.com/remix-run/react-router/pull/12206))
|
|
127
|
+
|
|
126
128
|
- 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
|
|
127
129
|
- 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
|
|
128
130
|
- ⚠️ 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.
|
|
@@ -156,6 +158,7 @@
|
|
|
156
158
|
- \[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))
|
|
157
159
|
|
|
158
160
|
- \[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))
|
|
161
|
+
|
|
159
162
|
- The API has been renamed to `unstable_generateMiddlewareResponse` for clarity
|
|
160
163
|
- 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
|
|
161
164
|
- The `query` version of the API now has a signature of `(query: (r: Request) => Promise<StaticHandlerContext | Response>) => Promise<Response>`
|
|
@@ -801,6 +804,7 @@
|
|
|
801
804
|
```
|
|
802
805
|
|
|
803
806
|
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:
|
|
807
|
+
|
|
804
808
|
- Library mode - `createBrowserRouter(routes, { unstable_getContext })`
|
|
805
809
|
- Framework mode - `<HydratedRouter unstable_getContext>`
|
|
806
810
|
|
|
@@ -988,6 +992,7 @@ _No changes_
|
|
|
988
992
|
- Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697))
|
|
989
993
|
|
|
990
994
|
- 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))
|
|
995
|
+
|
|
991
996
|
- `createCookie`
|
|
992
997
|
- `createCookieSessionStorage`
|
|
993
998
|
- `createMemorySessionStorage`
|
|
@@ -996,6 +1001,7 @@ _No changes_
|
|
|
996
1001
|
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)
|
|
997
1002
|
|
|
998
1003
|
Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
|
|
1004
|
+
|
|
999
1005
|
- `createCookieFactory`
|
|
1000
1006
|
- `createSessionStorageFactory`
|
|
1001
1007
|
- `createCookieSessionStorageFactory`
|
|
@@ -1151,6 +1157,7 @@ _No changes_
|
|
|
1151
1157
|
```
|
|
1152
1158
|
|
|
1153
1159
|
This initial implementation targets type inference for:
|
|
1160
|
+
|
|
1154
1161
|
- `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
|
|
1155
1162
|
- `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
|
|
1156
1163
|
- `ActionData` : Action data from `action` and/or `clientAction` within your route module
|
|
@@ -1165,6 +1172,7 @@ _No changes_
|
|
|
1165
1172
|
```
|
|
1166
1173
|
|
|
1167
1174
|
Check out our docs for more:
|
|
1175
|
+
|
|
1168
1176
|
- [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
|
|
1169
1177
|
- [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
|
|
1170
1178
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.9.3
|
|
2
|
+
* react-router v7.9.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
withComponentProps,
|
|
61
61
|
withErrorBoundaryProps,
|
|
62
62
|
withHydrateFallbackProps
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-NISHYRIK.mjs";
|
|
64
64
|
|
|
65
65
|
// lib/dom/ssr/server.tsx
|
|
66
66
|
import * as React from "react";
|