react-router 7.14.2 → 7.15.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 +59 -0
- package/dist/development/{browser-I6n6wVSO.d.mts → browser-CRsXgNrY.d.mts} +2 -2
- package/dist/{production/browser-I6n6wVSO.d.mts → development/browser-wDl1FZEL.d.ts} +2 -2
- package/dist/{production/chunk-PQL4HLVQ.js → development/chunk-2D5H3HU3.js} +7 -7
- package/dist/development/{chunk-EVOBXE3Y.mjs → chunk-5KNZJZUH.mjs} +341 -208
- package/dist/development/{chunk-ZZNWZ5Q3.js → chunk-AM3XM4LS.js} +331 -205
- package/dist/development/{chunk-YQSHRJWW.mjs → chunk-RMD3H4O3.mjs} +80 -61
- package/dist/development/{chunk-YZKCRDTN.js → chunk-Z5YQYACE.js} +146 -139
- package/dist/{production/context-DGGUoDIu.d.mts → development/context-BQs41HrG.d.mts} +94 -42
- package/dist/development/{routeModules-7rtk67cd.d.ts → data-BVUf681J.d.mts} +64 -46
- package/dist/development/{routeModules-BW4a8k3I.d.mts → data-BqZ2x964.d.ts} +64 -46
- package/dist/development/dom-export.d.mts +8 -8
- package/dist/development/dom-export.d.ts +8 -8
- package/dist/development/dom-export.js +37 -40
- package/dist/development/dom-export.mjs +12 -15
- package/dist/development/{index-react-server-client-BBd0A0TL.d.ts → index-react-server-client-CSv-KZBk.d.ts} +123 -121
- package/dist/{production/index-react-server-client-BjhKIe3u.d.mts → development/index-react-server-client-Ck_yZ1qL.d.mts} +102 -100
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +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.d.mts +107 -36
- package/dist/development/index-react-server.d.ts +107 -36
- package/dist/development/index-react-server.js +60 -33
- package/dist/development/index-react-server.mjs +60 -33
- package/dist/development/index.d.mts +10 -10
- package/dist/development/index.d.ts +10 -10
- package/dist/development/index.js +173 -154
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-g0dG8UL0.d.ts → development/instrumentation-DlJ2QV7d.d.ts} +73 -21
- package/dist/development/lib/types/internal.d.mts +2 -2
- package/dist/development/lib/types/internal.d.ts +2 -2
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/development/{register-DcBltf5q.d.ts → register-Bsscfj79.d.ts} +1 -1
- package/dist/{production/register-DcBltf5q.d.ts → development/register-Df8okEea.d.mts} +1 -1
- package/dist/production/{browser-C-UvoYvi.d.ts → browser-CRsXgNrY.d.mts} +2 -2
- package/dist/{development/browser-C-UvoYvi.d.ts → production/browser-wDl1FZEL.d.ts} +2 -2
- package/dist/production/{chunk-2WLZNCK5.mjs → chunk-23ZOHYE5.mjs} +80 -61
- package/dist/{development/chunk-PZFPF4X7.js → production/chunk-7YXKJMLN.js} +7 -7
- package/dist/production/{chunk-LK6U7ULH.mjs → chunk-GM3PW4GX.mjs} +341 -208
- package/dist/production/{chunk-X5SKXJ4A.js → chunk-LCJTIOKZ.js} +331 -205
- package/dist/production/{chunk-UJQ4OJF4.js → chunk-YBQJ3ABE.js} +146 -139
- package/dist/{development/context-DGGUoDIu.d.mts → production/context-BQs41HrG.d.mts} +94 -42
- package/dist/production/{routeModules-7rtk67cd.d.ts → data-BVUf681J.d.mts} +64 -46
- package/dist/production/{routeModules-BW4a8k3I.d.mts → data-BqZ2x964.d.ts} +64 -46
- package/dist/production/dom-export.d.mts +8 -8
- package/dist/production/dom-export.d.ts +8 -8
- package/dist/production/dom-export.js +37 -40
- package/dist/production/dom-export.mjs +12 -15
- package/dist/production/{index-react-server-client-BBd0A0TL.d.ts → index-react-server-client-CSv-KZBk.d.ts} +123 -121
- package/dist/{development/index-react-server-client-BjhKIe3u.d.mts → production/index-react-server-client-Ck_yZ1qL.d.mts} +102 -100
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +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.d.mts +107 -36
- package/dist/production/index-react-server.d.ts +107 -36
- package/dist/production/index-react-server.js +60 -33
- package/dist/production/index-react-server.mjs +60 -33
- package/dist/production/index.d.mts +10 -10
- package/dist/production/index.d.ts +10 -10
- package/dist/production/index.js +173 -154
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-g0dG8UL0.d.ts → production/instrumentation-DlJ2QV7d.d.ts} +73 -21
- package/dist/production/lib/types/internal.d.mts +2 -2
- package/dist/production/lib/types/internal.d.ts +2 -2
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/register-D9d2sMQ7.d.mts → production/register-Bsscfj79.d.ts} +1 -1
- package/dist/production/{register-D9d2sMQ7.d.mts → register-Df8okEea.d.mts} +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,64 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## v7.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Stabilize `unstable_defaultShouldRevalidate` as `defaultShouldRevalidate` on `<Link>`, `<Form>`, `useLinkClickHandler`, `useSubmit`, `fetcher.submit`, and `setSearchParams` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
|
|
8
|
+
|
|
9
|
+
- ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
|
|
10
|
+
|
|
11
|
+
- Stabilize the instrumentation APIs. `unstable_instrumentations` is now `instrumentations` and `unstable_pattern` is now `pattern` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
|
|
12
|
+
|
|
13
|
+
- The `unstable_ServerInstrumentation`, `unstable_ClientInstrumentation`, `unstable_InstrumentRequestHandlerFunction`, `unstable_InstrumentRouterFunction`, `unstable_InstrumentRouteFunction`, and `unstable_InstrumentationHandlerResult` types have had their `unstable_` prefixes removed
|
|
14
|
+
- ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
|
|
15
|
+
|
|
16
|
+
- Stabilize `unstable_mask` as `mask` on `<Link>`, `useLinkClickHandler`, and `useNavigate`, and rename the corresponding `Location.unstable_mask` field to `Location.mask` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
|
|
17
|
+
|
|
18
|
+
- ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
|
|
19
|
+
|
|
20
|
+
- Stabilize the `unstable_normalizePath` option on `staticHandler.query` and `staticHandler.queryRoute` as `normalizePath` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
|
|
21
|
+
|
|
22
|
+
- ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
|
|
23
|
+
|
|
24
|
+
- Stabilize `future.unstable_passThroughRequests` as `future.v8_passThroughRequests` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
|
|
25
|
+
|
|
26
|
+
- ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
|
|
27
|
+
|
|
28
|
+
- Remove `unstable_subResourceIntegrity` from the runtime `FutureConfig` type; the flag is now controlled by the top-level `subResourceIntegrity` option in `react-router.config.ts` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
|
|
29
|
+
|
|
30
|
+
- ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
|
|
31
|
+
|
|
32
|
+
- Stabilize `unstable_url` as `url` on `loader`, `action`, and `middleware` function args ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
|
|
33
|
+
|
|
34
|
+
- ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
|
|
35
|
+
|
|
36
|
+
- Stabilize `unstable_useTransitions` as `useTransitions` on `<BrowserRouter>`, `<HashRouter>`, `<HistoryRouter>`, `<MemoryRouter>`, `<Router>`, `<RouterProvider>`, `<HydratedRouter>`, and `useLinkClickHandler` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
|
|
37
|
+
|
|
38
|
+
- ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
|
|
39
|
+
|
|
40
|
+
### Patch Changes
|
|
41
|
+
|
|
42
|
+
- Add `nonce` to `<Scripts>` `<link rel="modulepreload">` elements (if provided) ([af5d49b](https://github.com/remix-run/react-router/commit/af5d49b))
|
|
43
|
+
|
|
44
|
+
- Fix a bug with `unstable_defaultShouldRevalidate={false}` where parent routes that did not export a `shouldRevalidate` function could be incorrectly included in the single fetch call for new child route data ([#15012](https://github.com/remix-run/react-router/pull/15012))
|
|
45
|
+
|
|
46
|
+
- Improve server-side route matching performance by pre-computing flattened/cached route branches ([#14967](https://github.com/remix-run/react-router/pull/14967)) ([af5d49b](https://github.com/remix-run/react-router/commit/af5d49b))
|
|
47
|
+
|
|
48
|
+
- Performance benchmarks showed roughly a 10-15% improvement in server-side request handling performance
|
|
49
|
+
|
|
50
|
+
- Mark `mask` as an optional field in `Location` for easier mocking in unit tests ([#14999](https://github.com/remix-run/react-router/pull/14999))
|
|
51
|
+
|
|
52
|
+
- Cache flattened/ranked route branches to optimize server-side route matching ([#14967](https://github.com/remix-run/react-router/pull/14967))
|
|
53
|
+
|
|
54
|
+
- Improve route matching performance in Framework/Data Mode ([#14971](https://github.com/remix-run/react-router/pull/14971)) ([af5d49b](https://github.com/remix-run/react-router/commit/af5d49b))
|
|
55
|
+
|
|
56
|
+
- Avoiding unnecessary calls to `matchRoutes` in data router scenarios
|
|
57
|
+
- This includes adding back the optimization that was removed in `7.6.0` ([#13562](https://github.com/remix-run/react-router/pull/13562))
|
|
58
|
+
- The issues that prompted the revert have been addressed by using the available router `matches` but always updating `match.route` to the latest route in the `manifest`
|
|
59
|
+
- Leverage pre-computed pre-computing flattened/cached route branches during client side route matching
|
|
60
|
+
- Performance benchmarks showed roughly a 15-30% improvement in server-side request handling performance
|
|
61
|
+
|
|
3
62
|
## v7.14.2
|
|
4
63
|
|
|
5
64
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterInit } from './context-
|
|
3
|
-
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './
|
|
2
|
+
import { R as RouterInit } from './context-BQs41HrG.mjs';
|
|
3
|
+
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './data-BVUf681J.mjs';
|
|
4
4
|
|
|
5
5
|
declare function getRequest(): Request;
|
|
6
6
|
type RSCRouteConfigEntryBase = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { R as RouterInit } from './
|
|
3
|
-
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './
|
|
2
|
+
import { R as RouterInit } from './instrumentation-DlJ2QV7d.js';
|
|
3
|
+
import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './data-BqZ2x964.js';
|
|
4
4
|
|
|
5
5
|
declare function getRequest(): Request;
|
|
6
6
|
type RSCRouteConfigEntryBase = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
|
|
2
|
-
* react-router v7.
|
|
2
|
+
* react-router v7.15.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkAM3XM4LSjs = require('./chunk-AM3XM4LS.js');
|
|
18
18
|
|
|
19
19
|
// lib/dom/ssr/hydration.tsx
|
|
20
20
|
function getHydrationData({
|
|
@@ -29,12 +29,12 @@ function getHydrationData({
|
|
|
29
29
|
...state,
|
|
30
30
|
loaderData: { ...state.loaderData }
|
|
31
31
|
};
|
|
32
|
-
let initialMatches =
|
|
32
|
+
let initialMatches = _chunkAM3XM4LSjs.matchRoutes.call(void 0, routes, location, basename);
|
|
33
33
|
if (initialMatches) {
|
|
34
34
|
for (let match of initialMatches) {
|
|
35
35
|
let routeId = match.route.id;
|
|
36
36
|
let routeInfo = getRouteInfo(routeId);
|
|
37
|
-
if (
|
|
37
|
+
if (_chunkAM3XM4LSjs.shouldHydrateRouteLoader.call(void 0,
|
|
38
38
|
routeId,
|
|
39
39
|
routeInfo.clientLoader,
|
|
40
40
|
routeInfo.hasLoader,
|
|
@@ -112,7 +112,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
|
-
if (
|
|
115
|
+
if (_chunkAM3XM4LSjs.isRouteErrorResponse.call(void 0, error)) {
|
|
116
116
|
return /* @__PURE__ */ _react2.default.createElement(
|
|
117
117
|
ErrorWrapper,
|
|
118
118
|
{
|
|
@@ -120,7 +120,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
120
120
|
title: "Unhandled Thrown Response!"
|
|
121
121
|
},
|
|
122
122
|
/* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
123
|
-
|
|
123
|
+
_chunkAM3XM4LSjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
126
|
let errorInstance;
|
|
@@ -146,7 +146,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
146
146
|
function RSCDefaultRootErrorBoundary({
|
|
147
147
|
hasRootLayout
|
|
148
148
|
}) {
|
|
149
|
-
let error =
|
|
149
|
+
let error = _chunkAM3XM4LSjs.useRouteError.call(void 0, );
|
|
150
150
|
if (hasRootLayout === void 0) {
|
|
151
151
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
152
152
|
}
|