react-router 7.6.1-pre.2 → 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 CHANGED
@@ -1,18 +1,6 @@
1
1
  # `react-router`
2
2
 
3
- ## 7.6.1-pre.2
4
-
5
- ### Patch Changes
6
-
7
- - [REMOVE] Revert tsup changes ([#13667](https://github.com/remix-run/react-router/pull/13667))
8
-
9
- ## 7.6.1-pre.1
10
-
11
- ### Patch Changes
12
-
13
- - [REMOVE] test changeset to force prerelease ([`d79c4fcac`](https://github.com/remix-run/react-router/commit/d79c4fcac236fd3bd5041ba706b2c52370337915))
14
-
15
- ## 7.6.1-pre.0
3
+ ## 7.6.1
16
4
 
17
5
  ### Patch Changes
18
6
 
@@ -21,6 +9,7 @@
21
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.
22
10
 
23
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
+
24
13
  - Fix typegen when same route is used at multiple paths ([#13574](https://github.com/remix-run/react-router/pull/13574))
25
14
 
26
15
  For example, `routes/route.tsx` is used at 4 different paths here:
@@ -50,7 +39,7 @@
50
39
 
51
40
  export default [
52
41
  route("parent/:p", "routes/parent.tsx", [
53
- route("route/:r", "routes/route.tsx", [
42
+ route("layout/:l", "routes/layout.tsx", [
54
43
  route("child1/:c1a/:c1b", "routes/child1.tsx"),
55
44
  route("child2/:c2a/:c2b", "routes/child2.tsx"),
56
45
  ]),
@@ -58,9 +47,9 @@
58
47
  ] satisfies RouteConfig;
59
48
  ```
60
49
 
61
- Previously, `params` for `routes/route` were calculated as `{ p: string, r: string }`.
50
+ Previously, `params` for the `routes/layout.tsx` route were calculated as `{ p: string, l: string }`.
62
51
  This incorrectly ignores params that could come from child routes.
63
- If visiting `/parent/1/route/2/child1/3/4`, the actual params passed to `routes/route` will have a type of `{ p: string, r: string, c1a: string, c1b: string }`.
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 }`.
64
53
 
65
54
  Now, `params` are aware of child routes and autocompletion will include child params as optionals:
66
55
 
@@ -68,21 +57,21 @@
68
57
  params.|
69
58
  // ^ cursor is here and you ask for autocompletion
70
59
  // p: string
71
- // r: string
60
+ // l: string
72
61
  // c1a?: string
73
62
  // c1b?: string
74
63
  // c2a?: string
75
64
  // c2b?: string
76
65
  ```
77
66
 
78
- You can also narrow the types for `params` as it is implemented as a normalized union of params for each page that includes `routes/route`:
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`:
79
68
 
80
69
  ```ts
81
70
  if (typeof params.c1a === 'string') {
82
71
  params.|
83
72
  // ^ cursor is here and you ask for autocompletion
84
73
  // p: string
85
- // r: string
74
+ // l: string
86
75
  // c1a: string
87
76
  // c1b: string
88
77
  }
@@ -94,7 +83,7 @@
94
83
  UNSTABLE: removed `Info` export from generated `+types/*` files
95
84
 
96
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))
97
- - Remove hashes from files in `dist/` for easier usage with `patch-package` ([#13567](https://github.com/remix-run/react-router/pull/13567))
86
+
98
87
  - href replaces splats `*` ([#13593](https://github.com/remix-run/react-router/pull/13593))
99
88
 
100
89
  ```ts
@@ -508,8 +497,6 @@
508
497
 
509
498
  For library and framework authors using `unstable_SerializesTo`, you may need to add `as unknown` casts before casting to `unstable_SerializesTo`.
510
499
 
511
- - \[REMOVE] Remove middleware depth logic and always call middlware for all matches ([#13172](https://github.com/remix-run/react-router/pull/13172))
512
-
513
500
  - Fix single fetch `_root.data` requests when a `basename` is used ([#12898](https://github.com/remix-run/react-router/pull/12898))
514
501
 
515
502
  - Add `context` support to client side data routers (unstable) ([#12941](https://github.com/remix-run/react-router/pull/12941))
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -8685,7 +8685,7 @@ function mergeRefs(...refs) {
8685
8685
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
8686
8686
  try {
8687
8687
  if (isBrowser) {
8688
- window.__reactRouterVersion = "7.6.1-pre.2";
8688
+ window.__reactRouterVersion = "7.6.1";
8689
8689
  }
8690
8690
  } catch (e) {
8691
8691
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -25,7 +25,7 @@ import {
25
25
  invariant,
26
26
  mapRouteProperties,
27
27
  useFogOFWarDiscovery
28
- } from "./chunk-H4Y5ODCL.mjs";
28
+ } from "./chunk-DQRVZFIR.mjs";
29
29
 
30
30
  // lib/dom-export/dom-router-provider.tsx
31
31
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -8835,7 +8835,7 @@ function mergeRefs(...refs) {
8835
8835
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
8836
8836
  try {
8837
8837
  if (isBrowser) {
8838
- window.__reactRouterVersion = "7.6.1-pre.2";
8838
+ window.__reactRouterVersion = "7.6.1";
8839
8839
  }
8840
8840
  } catch (e) {
8841
8841
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -125,7 +125,7 @@ import {
125
125
  useSearchParams,
126
126
  useSubmit,
127
127
  useViewTransitionState
128
- } from "./chunk-H4Y5ODCL.mjs";
128
+ } from "./chunk-DQRVZFIR.mjs";
129
129
  export {
130
130
  Await,
131
131
  BrowserRouter,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -8685,7 +8685,7 @@ function mergeRefs(...refs) {
8685
8685
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
8686
8686
  try {
8687
8687
  if (isBrowser) {
8688
- window.__reactRouterVersion = "7.6.1-pre.2";
8688
+ window.__reactRouterVersion = "7.6.1";
8689
8689
  }
8690
8690
  } catch (e) {
8691
8691
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -25,7 +25,7 @@ import {
25
25
  invariant,
26
26
  mapRouteProperties,
27
27
  useFogOFWarDiscovery
28
- } from "./chunk-WUZRT63N.mjs";
28
+ } from "./chunk-UG2XJOVM.mjs";
29
29
 
30
30
  // lib/dom-export/dom-router-provider.tsx
31
31
  import * as React from "react";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -8835,7 +8835,7 @@ function mergeRefs(...refs) {
8835
8835
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
8836
8836
  try {
8837
8837
  if (isBrowser) {
8838
- window.__reactRouterVersion = "7.6.1-pre.2";
8838
+ window.__reactRouterVersion = "7.6.1";
8839
8839
  }
8840
8840
  } catch (e) {
8841
8841
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -125,7 +125,7 @@ import {
125
125
  useSearchParams,
126
126
  useSubmit,
127
127
  useViewTransitionState
128
- } from "./chunk-WUZRT63N.mjs";
128
+ } from "./chunk-UG2XJOVM.mjs";
129
129
  export {
130
130
  Await,
131
131
  BrowserRouter,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.6.1-pre.2
2
+ * react-router v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-router",
3
- "version": "7.6.1-pre.2",
3
+ "version": "7.6.1",
4
4
  "description": "Declarative routing for React",
5
5
  "keywords": [
6
6
  "react",