@react-router/dev 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,28 +1,11 @@
1
1
  # `@react-router/dev`
2
2
 
3
- ## 7.6.1-pre.2
4
-
5
- ### Patch Changes
6
-
7
- - Updated dependencies:
8
- - `react-router@7.6.1-pre.2`
9
- - `@react-router/node@7.6.1-pre.2`
10
- - `@react-router/serve@7.6.1-pre.2`
11
-
12
- ## 7.6.1-pre.1
13
-
14
- ### Patch Changes
15
-
16
- - Updated dependencies:
17
- - `react-router@7.6.1-pre.1`
18
- - `@react-router/node@7.6.1-pre.1`
19
- - `@react-router/serve@7.6.1-pre.1`
20
-
21
- ## 7.6.1-pre.0
3
+ ## 7.6.1
22
4
 
23
5
  ### Patch Changes
24
6
 
25
7
  - Prevent typegen with route files are outside the app directory ([#12996](https://github.com/remix-run/react-router/pull/12996))
8
+
26
9
  - Fix typegen when same route is used at multiple paths ([#13574](https://github.com/remix-run/react-router/pull/13574))
27
10
 
28
11
  For example, `routes/route.tsx` is used at 4 different paths here:
@@ -43,6 +26,7 @@
43
26
  Now, typegen creates unions as necessary for alternate paths for the same route file.
44
27
 
45
28
  - Add additional logging to `build` command output when cleaning assets from server build ([#13547](https://github.com/remix-run/react-router/pull/13547))
29
+
46
30
  - Better types for `params` ([#13543](https://github.com/remix-run/react-router/pull/13543))
47
31
 
48
32
  For example:
@@ -53,7 +37,7 @@
53
37
 
54
38
  export default [
55
39
  route("parent/:p", "routes/parent.tsx", [
56
- route("route/:r", "routes/route.tsx", [
40
+ route("layout/:l", "routes/layout.tsx", [
57
41
  route("child1/:c1a/:c1b", "routes/child1.tsx"),
58
42
  route("child2/:c2a/:c2b", "routes/child2.tsx"),
59
43
  ]),
@@ -61,9 +45,9 @@
61
45
  ] satisfies RouteConfig;
62
46
  ```
63
47
 
64
- Previously, `params` for `routes/route` were calculated as `{ p: string, r: string }`.
48
+ Previously, `params` for the `routes/layout.tsx` route were calculated as `{ p: string, l: string }`.
65
49
  This incorrectly ignores params that could come from child routes.
66
- 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 }`.
50
+ 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 }`.
67
51
 
68
52
  Now, `params` are aware of child routes and autocompletion will include child params as optionals:
69
53
 
@@ -71,21 +55,21 @@
71
55
  params.|
72
56
  // ^ cursor is here and you ask for autocompletion
73
57
  // p: string
74
- // r: string
58
+ // l: string
75
59
  // c1a?: string
76
60
  // c1b?: string
77
61
  // c2a?: string
78
62
  // c2b?: string
79
63
  ```
80
64
 
81
- 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`:
65
+ 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`:
82
66
 
83
67
  ```ts
84
68
  if (typeof params.c1a === 'string') {
85
69
  params.|
86
70
  // ^ cursor is here and you ask for autocompletion
87
71
  // p: string
88
- // r: string
72
+ // l: string
89
73
  // c1a: string
90
74
  // c1b: string
91
75
  }
@@ -96,8 +80,10 @@
96
80
  UNSTABLE: renamed internal `react-router/route-module` export to `react-router/internal`
97
81
  UNSTABLE: removed `Info` export from generated `+types/*` files
98
82
 
99
- - [UNSTABLE] Normalize dirent entry path across node versions when generating SRI manifest ([#13591](https://github.com/remix-run/react-router/pull/13591))
83
+ - \[UNSTABLE] Normalize dirent entry path across node versions when generating SRI manifest ([#13591](https://github.com/remix-run/react-router/pull/13591))
84
+
100
85
  - Don't clean assets from server build when `build.ssrEmitAssets` has been enabled in Vite config ([#13547](https://github.com/remix-run/react-router/pull/13547))
86
+
101
87
  - Fix `href` for optional segments ([#13595](https://github.com/remix-run/react-router/pull/13595))
102
88
 
103
89
  Type generation now expands paths with optionals into their corresponding non-optional paths.
@@ -126,9 +112,9 @@
126
112
  ```
127
113
 
128
114
  - Updated dependencies:
129
- - `react-router@7.6.1-pre.0`
130
- - `@react-router/node@7.6.1-pre.0`
131
- - `@react-router/serve@7.6.1-pre.0`
115
+ - `react-router@7.6.1`
116
+ - `@react-router/node@7.6.1`
117
+ - `@react-router/serve@7.6.1`
132
118
 
133
119
  ## 7.6.0
134
120
 
package/dist/cli/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * @react-router/dev v7.6.1-pre.2
3
+ * @react-router/dev v7.6.1
4
4
  *
5
5
  * Copyright (c) Remix Software Inc.
6
6
  *
package/dist/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.6.1-pre.2
2
+ * @react-router/dev v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/routes.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.6.1-pre.2
2
+ * @react-router/dev v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.6.1-pre.2
2
+ * @react-router/dev v7.6.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/vite.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.6.1-pre.2
2
+ * @react-router/dev 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/dev",
3
- "version": "7.6.1-pre.2",
3
+ "version": "7.6.1",
4
4
  "description": "Dev tools and CLI for React Router",
5
5
  "homepage": "https://reactrouter.com",
6
6
  "bugs": {
@@ -86,7 +86,7 @@
86
86
  "set-cookie-parser": "^2.6.0",
87
87
  "valibot": "^0.41.0",
88
88
  "vite-node": "3.0.0-beta.2",
89
- "@react-router/node": "7.6.1-pre.2"
89
+ "@react-router/node": "7.6.1"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@types/babel__core": "^7.20.5",
@@ -110,15 +110,15 @@
110
110
  "vite": "^6.1.0",
111
111
  "wireit": "0.14.9",
112
112
  "wrangler": "^4.2.0",
113
- "@react-router/serve": "7.6.1-pre.2",
114
- "react-router": "^7.6.1-pre.2"
113
+ "@react-router/serve": "7.6.1",
114
+ "react-router": "^7.6.1"
115
115
  },
116
116
  "peerDependencies": {
117
117
  "typescript": "^5.1.0",
118
118
  "vite": "^5.1.0 || ^6.0.0",
119
119
  "wrangler": "^3.28.2 || ^4.0.0",
120
- "@react-router/serve": "^7.6.1-pre.2",
121
- "react-router": "^7.6.1-pre.2"
120
+ "@react-router/serve": "^7.6.1",
121
+ "react-router": "^7.6.1"
122
122
  },
123
123
  "peerDependenciesMeta": {
124
124
  "@react-router/serve": {