react-router 7.6.1-pre.1 → 7.6.1
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 +9 -16
- package/dist/development/chunk-DQRVZFIR.mjs +11565 -0
- package/dist/development/dom-export.d.mts +2 -1
- package/dist/development/dom-export.js +1 -1
- package/dist/development/dom-export.mjs +23 -23
- package/dist/development/index.d.mts +260 -3751
- package/dist/development/index.d.ts +4 -1767
- package/dist/development/index.js +2 -2
- package/dist/development/index.mjs +121 -11439
- package/dist/development/lib/types/internal.d.mts +210 -0
- package/dist/development/lib/types/internal.d.ts +209 -0
- package/dist/{production/internal-export.js → development/lib/types/internal.js} +4 -4
- package/dist/{production/internal-export.mjs → development/lib/types/internal.mjs} +1 -1
- package/dist/development/lib-B8x_tOvL.d.mts +1736 -0
- package/dist/development/register-BkDIKxVz.d.ts +1816 -0
- package/dist/development/register-DeIo2iHO.d.mts +24 -0
- package/dist/development/route-data-WyrduLgj.d.mts +1793 -0
- package/dist/production/chunk-UG2XJOVM.mjs +11565 -0
- package/dist/production/dom-export.d.mts +2 -1
- package/dist/production/dom-export.js +1 -1
- package/dist/production/dom-export.mjs +23 -23
- package/dist/production/index.d.mts +260 -3751
- package/dist/production/index.d.ts +4 -1767
- package/dist/production/index.js +2 -2
- package/dist/production/index.mjs +121 -11439
- package/dist/production/lib/types/internal.d.mts +210 -0
- package/dist/production/lib/types/internal.d.ts +209 -0
- package/dist/{development/internal-export.js → production/lib/types/internal.js} +4 -4
- package/dist/{development/internal-export.mjs → production/lib/types/internal.mjs} +1 -1
- package/dist/production/lib-B8x_tOvL.d.mts +1736 -0
- package/dist/production/register-BkDIKxVz.d.ts +1816 -0
- package/dist/production/register-DeIo2iHO.d.mts +24 -0
- package/dist/production/route-data-WyrduLgj.d.mts +1793 -0
- package/package.json +4 -4
- package/dist/development/internal-export.d.mts +0 -504
- package/dist/development/internal-export.d.ts +0 -504
- package/dist/production/internal-export.d.mts +0 -504
- package/dist/production/internal-export.d.ts +0 -504
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
-
## 7.6.1
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- [REMOVE] test changeset to force prerelease ([`d79c4fcac`](https://github.com/remix-run/react-router/commit/d79c4fcac236fd3bd5041ba706b2c52370337915))
|
|
8
|
-
|
|
9
|
-
## 7.6.1-pre.0
|
|
3
|
+
## 7.6.1
|
|
10
4
|
|
|
11
5
|
### Patch Changes
|
|
12
6
|
|
|
@@ -15,6 +9,7 @@
|
|
|
15
9
|
This is primarily for cases where a route `loader` threw an error to it's own `ErrorBoundary`. but it also arises in the case of a 404 which renders the root `ErrorBoundary`/`meta` but the root loader did not run because not routes matched.
|
|
16
10
|
|
|
17
11
|
- Partially revert optimization added in `7.1.4` to reduce calls to `matchRoutes` because it surfaced other issues ([#13562](https://github.com/remix-run/react-router/pull/13562))
|
|
12
|
+
|
|
18
13
|
- Fix typegen when same route is used at multiple paths ([#13574](https://github.com/remix-run/react-router/pull/13574))
|
|
19
14
|
|
|
20
15
|
For example, `routes/route.tsx` is used at 4 different paths here:
|
|
@@ -44,7 +39,7 @@
|
|
|
44
39
|
|
|
45
40
|
export default [
|
|
46
41
|
route("parent/:p", "routes/parent.tsx", [
|
|
47
|
-
route("
|
|
42
|
+
route("layout/:l", "routes/layout.tsx", [
|
|
48
43
|
route("child1/:c1a/:c1b", "routes/child1.tsx"),
|
|
49
44
|
route("child2/:c2a/:c2b", "routes/child2.tsx"),
|
|
50
45
|
]),
|
|
@@ -52,9 +47,9 @@
|
|
|
52
47
|
] satisfies RouteConfig;
|
|
53
48
|
```
|
|
54
49
|
|
|
55
|
-
Previously, `params` for `routes/
|
|
50
|
+
Previously, `params` for the `routes/layout.tsx` route were calculated as `{ p: string, l: string }`.
|
|
56
51
|
This incorrectly ignores params that could come from child routes.
|
|
57
|
-
If visiting `/parent/1/
|
|
52
|
+
If visiting `/parent/1/layout/2/child1/3/4`, the actual params passed to `routes/layout.tsx` will have a type of `{ p: string, l: string, c1a: string, c1b: string }`.
|
|
58
53
|
|
|
59
54
|
Now, `params` are aware of child routes and autocompletion will include child params as optionals:
|
|
60
55
|
|
|
@@ -62,21 +57,21 @@
|
|
|
62
57
|
params.|
|
|
63
58
|
// ^ cursor is here and you ask for autocompletion
|
|
64
59
|
// p: string
|
|
65
|
-
//
|
|
60
|
+
// l: string
|
|
66
61
|
// c1a?: string
|
|
67
62
|
// c1b?: string
|
|
68
63
|
// c2a?: string
|
|
69
64
|
// c2b?: string
|
|
70
65
|
```
|
|
71
66
|
|
|
72
|
-
You can also narrow the types for `params` as it is implemented as a normalized union of params for each page that includes `routes/
|
|
67
|
+
You can also narrow the types for `params` as it is implemented as a normalized union of params for each page that includes `routes/layout.tsx`:
|
|
73
68
|
|
|
74
69
|
```ts
|
|
75
70
|
if (typeof params.c1a === 'string') {
|
|
76
71
|
params.|
|
|
77
72
|
// ^ cursor is here and you ask for autocompletion
|
|
78
73
|
// p: string
|
|
79
|
-
//
|
|
74
|
+
// l: string
|
|
80
75
|
// c1a: string
|
|
81
76
|
// c1b: string
|
|
82
77
|
}
|
|
@@ -88,7 +83,7 @@
|
|
|
88
83
|
UNSTABLE: removed `Info` export from generated `+types/*` files
|
|
89
84
|
|
|
90
85
|
- Avoid initial fetcher execution 404 error when Lazy Route Discovery is interrupted by a navigation ([#13564](https://github.com/remix-run/react-router/pull/13564))
|
|
91
|
-
|
|
86
|
+
|
|
92
87
|
- href replaces splats `*` ([#13593](https://github.com/remix-run/react-router/pull/13593))
|
|
93
88
|
|
|
94
89
|
```ts
|
|
@@ -502,8 +497,6 @@
|
|
|
502
497
|
|
|
503
498
|
For library and framework authors using `unstable_SerializesTo`, you may need to add `as unknown` casts before casting to `unstable_SerializesTo`.
|
|
504
499
|
|
|
505
|
-
- \[REMOVE] Remove middleware depth logic and always call middlware for all matches ([#13172](https://github.com/remix-run/react-router/pull/13172))
|
|
506
|
-
|
|
507
500
|
- Fix single fetch `_root.data` requests when a `basename` is used ([#12898](https://github.com/remix-run/react-router/pull/12898))
|
|
508
501
|
|
|
509
502
|
- Add `context` support to client side data routers (unstable) ([#12941](https://github.com/remix-run/react-router/pull/12941))
|