react-router 7.9.0 → 7.9.1-pre.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.
- package/CHANGELOG.md +7 -9
- package/dist/development/{chunk-S5YDGZLY.mjs → chunk-T2FO7LZR.mjs} +2 -2
- package/dist/development/{chunk-VHEBI3C5.js → chunk-XGGFIIA6.js} +1 -1
- package/dist/{production/chunk-HDA5IKPB.js → development/chunk-XMMS4S5U.js} +131 -131
- package/dist/development/{chunk-AKKEMMKB.mjs → chunk-Y3WUXTM5.mjs} +2 -2
- package/dist/development/{context-BH6Jwdoy.d.mts → context-CIdFp11b.d.mts} +1 -1
- package/dist/development/dom-export.d.mts +1 -1
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/{production/index-react-server-client-CMC2eQAY.d.ts → development/index-react-server-client-BYr9g50r.d.ts} +1 -1
- package/dist/{production/index-react-server-client-1cWMpKk4.d.mts → development/index-react-server-client-BeVfPpWg.d.mts} +2 -2
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +2 -2
- 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.d.mts +1 -1
- package/dist/development/index-react-server.d.ts +1 -1
- package/dist/development/index-react-server.js +1 -1
- package/dist/development/index-react-server.mjs +1 -1
- package/dist/development/index.d.mts +6 -6
- package/dist/development/index.d.ts +4 -4
- package/dist/development/index.js +96 -96
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.d.mts +39 -14
- package/dist/development/lib/types/internal.d.ts +38 -13
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{route-data-BQkq8Erj.d.mts → route-data-Bpm4liR_.d.mts} +1 -1
- package/dist/development/{routeModules-DSKAn01V.d.ts → routeModules-DnUHijGz.d.ts} +1 -1
- package/dist/production/{chunk-VNPMQDPD.js → chunk-CQNGOQ3L.js} +1 -1
- package/dist/production/{chunk-WOZJCBVO.mjs → chunk-CYDGAKF3.mjs} +2 -2
- package/dist/production/{chunk-MOZTWV63.mjs → chunk-NVD2TNOP.mjs} +2 -2
- package/dist/{development/chunk-UGCJQSTX.js → production/chunk-QSAZM6H2.js} +131 -131
- package/dist/production/{context-BH6Jwdoy.d.mts → context-CIdFp11b.d.mts} +1 -1
- package/dist/production/dom-export.d.mts +1 -1
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/{development/index-react-server-client-CMC2eQAY.d.ts → production/index-react-server-client-BYr9g50r.d.ts} +1 -1
- package/dist/{development/index-react-server-client-1cWMpKk4.d.mts → production/index-react-server-client-BeVfPpWg.d.mts} +2 -2
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +2 -2
- 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.d.mts +1 -1
- package/dist/production/index-react-server.d.ts +1 -1
- package/dist/production/index-react-server.js +1 -1
- package/dist/production/index-react-server.mjs +1 -1
- package/dist/production/index.d.mts +6 -6
- package/dist/production/index.d.ts +4 -4
- package/dist/production/index.js +96 -96
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.d.mts +39 -14
- package/dist/production/lib/types/internal.d.ts +38 -13
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/production/{route-data-BQkq8Erj.d.mts → route-data-Bpm4liR_.d.mts} +1 -1
- package/dist/production/{routeModules-DSKAn01V.d.ts → routeModules-DnUHijGz.d.ts} +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 7.9.1-pre.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix internal `Future` interface naming from `middleware` -> `v8_middleware` ([#14327](https://github.com/remix-run/react-router/pull/14327))
|
|
8
|
+
|
|
3
9
|
## 7.9.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -7,7 +13,6 @@
|
|
|
7
13
|
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
|
|
8
14
|
|
|
9
15
|
We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
|
|
10
|
-
|
|
11
16
|
- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
|
|
12
17
|
- [`createContext`](https://reactrouter.com/api/utils/createContext)
|
|
13
18
|
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
|
|
@@ -34,7 +39,7 @@
|
|
|
34
39
|
|
|
35
40
|
- \[UNSTABLE] Add `<RouterProvider unstable_onError>`/`<HydratedRouter unstable_onError>` prop for client side error reporting ([#14162](https://github.com/remix-run/react-router/pull/14162))
|
|
36
41
|
|
|
37
|
-
- server action revalidation opt out via $
|
|
42
|
+
- server action revalidation opt out via $SKIP_REVALIDATION field ([#14154](https://github.com/remix-run/react-router/pull/14154))
|
|
38
43
|
|
|
39
44
|
- Properly escape interpolated param values in `generatePath()` ([#13530](https://github.com/remix-run/react-router/pull/13530))
|
|
40
45
|
|
|
@@ -83,7 +88,6 @@
|
|
|
83
88
|
- Remove dependency on `@types/node` in TypeScript declaration files ([#14059](https://github.com/remix-run/react-router/pull/14059))
|
|
84
89
|
|
|
85
90
|
- 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
|
-
|
|
87
91
|
- 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
|
|
88
92
|
- 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
|
|
89
93
|
- ⚠️ 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.
|
|
@@ -117,7 +121,6 @@
|
|
|
117
121
|
- \[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))
|
|
118
122
|
|
|
119
123
|
- \[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
|
-
|
|
121
124
|
- The API has been renamed to `unstable_generateMiddlewareResponse` for clarity
|
|
122
125
|
- 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
|
|
123
126
|
- The `query` version of the API now has a signature of `(query: (r: Request) => Promise<StaticHandlerContext | Response>) => Promise<Response>`
|
|
@@ -763,7 +766,6 @@
|
|
|
763
766
|
```
|
|
764
767
|
|
|
765
768
|
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
|
-
|
|
767
769
|
- Library mode - `createBrowserRouter(routes, { unstable_getContext })`
|
|
768
770
|
- Framework mode - `<HydratedRouter unstable_getContext>`
|
|
769
771
|
|
|
@@ -951,7 +953,6 @@ _No changes_
|
|
|
951
953
|
- Remove `future.v7_normalizeFormMethod` future flag ([#11697](https://github.com/remix-run/react-router/pull/11697))
|
|
952
954
|
|
|
953
955
|
- 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
956
|
- `createCookie`
|
|
956
957
|
- `createCookieSessionStorage`
|
|
957
958
|
- `createMemorySessionStorage`
|
|
@@ -960,7 +961,6 @@ _No changes_
|
|
|
960
961
|
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
962
|
|
|
962
963
|
Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
|
|
963
|
-
|
|
964
964
|
- `createCookieFactory`
|
|
965
965
|
- `createSessionStorageFactory`
|
|
966
966
|
- `createCookieSessionStorageFactory`
|
|
@@ -1116,7 +1116,6 @@ _No changes_
|
|
|
1116
1116
|
```
|
|
1117
1117
|
|
|
1118
1118
|
This initial implementation targets type inference for:
|
|
1119
|
-
|
|
1120
1119
|
- `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
|
|
1121
1120
|
- `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
|
|
1122
1121
|
- `ActionData` : Action data from `action` and/or `clientAction` within your route module
|
|
@@ -1131,7 +1130,6 @@ _No changes_
|
|
|
1131
1130
|
```
|
|
1132
1131
|
|
|
1133
1132
|
Check out our docs for more:
|
|
1134
|
-
|
|
1135
1133
|
- [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
|
|
1136
1134
|
- [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
|
|
1137
1135
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v7.9.0
|
|
2
|
+
* react-router v7.9.1-pre.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";
|
|
8967
|
+
"7.9.1-pre.0";
|
|
8968
8968
|
}
|
|
8969
8969
|
} catch (e) {
|
|
8970
8970
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
2
|
-
* react-router v7.9.0
|
|
2
|
+
* react-router v7.9.1-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|