react-router 0.0.0-experimental-90b5209da → 0.0.0-experimental-1a4134895
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 +33 -0
- package/dist/development/{browser-BbBXFHbO.d.ts → browser-CVt-AVEw.d.ts} +1 -1
- package/dist/development/{browser-C07r42Tt.d.mts → browser-DMZL55jm.d.mts} +1 -1
- package/dist/development/{chunk-QIQKGWHV.js → chunk-FSS7BSX5.js} +7 -7
- package/dist/development/{chunk-JAADO4GZ.mjs → chunk-RSETISCY.mjs} +165 -168
- package/dist/development/{chunk-7VCSDYWN.js → chunk-SMU6VCE5.js} +163 -208
- package/dist/{production/chunk-M5RP3E64.mjs → development/chunk-U3QH42RN.mjs} +2 -2
- package/dist/development/{chunk-IWW3MAV5.js → chunk-UW2GWJ4V.js} +165 -123
- package/dist/development/dom-export.d.mts +19 -2
- package/dist/development/dom-export.d.ts +19 -2
- package/dist/development/dom-export.js +158 -103
- package/dist/development/dom-export.mjs +133 -79
- package/dist/development/{index-react-server-client-Da3kmxNd.d.ts → index-react-server-client-C_xKAMFL.d.ts} +69 -5
- package/dist/development/{index-react-server-client-rcoGPJhU.d.mts → index-react-server-client-MZL1faqV.d.mts} +69 -5
- package/dist/development/index-react-server-client.d.mts +2 -2
- 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 +2 -2
- package/dist/development/index-react-server.d.ts +2 -2
- package/dist/development/index-react-server.js +2 -7
- package/dist/development/index-react-server.mjs +2 -7
- package/dist/development/index.d.mts +16 -14
- package/dist/development/index.d.ts +16 -14
- package/dist/development/index.js +76 -76
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-Unc20tLk.d.ts → development/instrumentation-Clr86Wt0.d.ts} +50 -6
- 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-BpU9rFBJ.d.ts → register-B9kmG_ck.d.ts} +1 -1
- package/dist/development/{register-QkB3HGjm.d.mts → register-BQNO5hHg.d.mts} +1 -1
- package/dist/{production/router-CAvh_Drx.d.mts → development/router-CvHJZoz6.d.mts} +50 -6
- package/dist/production/{browser-BbBXFHbO.d.ts → browser-CVt-AVEw.d.ts} +1 -1
- package/dist/production/{browser-C07r42Tt.d.mts → browser-DMZL55jm.d.mts} +1 -1
- package/dist/production/{chunk-RUZ7DYEJ.js → chunk-2LYV46AY.js} +165 -123
- package/dist/production/{chunk-QEVH6ZBU.js → chunk-5LAWJKMP.js} +163 -208
- package/dist/{development/chunk-4LAZ4YCC.mjs → production/chunk-5SOZPEMG.mjs} +2 -2
- package/dist/production/{chunk-WA4Q44GF.js → chunk-7KUYQ25T.js} +7 -7
- package/dist/production/{chunk-G6E72HPD.mjs → chunk-DRFH75GK.mjs} +165 -168
- package/dist/production/dom-export.d.mts +19 -2
- package/dist/production/dom-export.d.ts +19 -2
- package/dist/production/dom-export.js +158 -103
- package/dist/production/dom-export.mjs +133 -79
- package/dist/production/{index-react-server-client-Da3kmxNd.d.ts → index-react-server-client-C_xKAMFL.d.ts} +69 -5
- package/dist/production/{index-react-server-client-rcoGPJhU.d.mts → index-react-server-client-MZL1faqV.d.mts} +69 -5
- package/dist/production/index-react-server-client.d.mts +2 -2
- 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 +2 -2
- package/dist/production/index-react-server.d.ts +2 -2
- package/dist/production/index-react-server.js +2 -7
- package/dist/production/index-react-server.mjs +2 -7
- package/dist/production/index.d.mts +16 -14
- package/dist/production/index.d.ts +16 -14
- package/dist/production/index.js +76 -76
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-Unc20tLk.d.ts → production/instrumentation-Clr86Wt0.d.ts} +50 -6
- 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/production/{register-BpU9rFBJ.d.ts → register-B9kmG_ck.d.ts} +1 -1
- package/dist/production/{register-QkB3HGjm.d.mts → register-BQNO5hHg.d.mts} +1 -1
- package/dist/{development/router-CAvh_Drx.d.mts → production/router-CvHJZoz6.d.mts} +50 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 7.9.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- \[UNSTABLE] Add `location`/`params` as arguments to client-side `unstable_onError` to permit enhanced error reporting. ([#14509](https://github.com/remix-run/react-router/pull/14509))
|
|
8
|
+
|
|
9
|
+
⚠️ This is a breaking change if you've already adopted `unstable_onError`. The second `errorInfo` parameter is now an object with `location` and `params`:
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
// Before
|
|
13
|
+
function errorHandler(error: unknown, errorInfo?: React.errorInfo) {
|
|
14
|
+
/*...*/
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// After
|
|
18
|
+
function errorHandler(
|
|
19
|
+
error: unknown,
|
|
20
|
+
info: {
|
|
21
|
+
location: Location;
|
|
22
|
+
params: Params;
|
|
23
|
+
errorInfo?: React.ErrorInfo;
|
|
24
|
+
},
|
|
25
|
+
) {
|
|
26
|
+
/*...*/
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
- Properly handle ancestor thrown middleware errors before `next()` on fetcher submissions ([#14517](https://github.com/remix-run/react-router/pull/14517))
|
|
31
|
+
|
|
32
|
+
- Fix issue with splat routes interfering with multiple calls to patchRoutesOnNavigation ([#14487](https://github.com/remix-run/react-router/pull/14487))
|
|
33
|
+
|
|
34
|
+
- Normalize double-slashes in `resolvePath` ([#14529](https://github.com/remix-run/react-router/pull/14529))
|
|
35
|
+
|
|
3
36
|
## 7.9.5
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
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, e as RouterInit } from './instrumentation-
|
|
2
|
+
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, e as RouterInit } from './instrumentation-Clr86Wt0.js';
|
|
3
3
|
|
|
4
4
|
type RSCRouteConfigEntryBase = {
|
|
5
5
|
action?: ActionFunction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
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, e as RouterInit } from './router-
|
|
2
|
+
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, e as RouterInit } from './router-CvHJZoz6.mjs';
|
|
3
3
|
|
|
4
4
|
type RSCRouteConfigEntryBase = {
|
|
5
5
|
action?: ActionFunction;
|
|
@@ -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 v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-1a4134895
|
|
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 _chunkSMU6VCE5js = require('./chunk-SMU6VCE5.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 = _chunkSMU6VCE5js.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 (_chunkSMU6VCE5js.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 (_chunkSMU6VCE5js.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
|
+
_chunkSMU6VCE5js.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 = _chunkSMU6VCE5js.useRouteError.call(void 0, );
|
|
150
150
|
if (hasRootLayout === void 0) {
|
|
151
151
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
152
152
|
}
|