Skip to content

Commit ec173d8

Browse files
chore: Update version for release (pre) (#13637)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 16aff14 commit ec173d8

File tree

23 files changed

+291
-12
lines changed

23 files changed

+291
-12
lines changed

.changeset/pre.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,19 @@
2828
"@playground/split-route-modules-spa": "0.0.0",
2929
"@playground/vite-plugin-cloudflare": "0.0.0"
3030
},
31-
"changesets": []
31+
"changesets": [
32+
"big-ladybugs-brush",
33+
"flat-seas-own",
34+
"funny-paws-divide",
35+
"gold-baboons-roll",
36+
"gold-socks-attack",
37+
"loud-actors-shop",
38+
"neat-candles-stare",
39+
"odd-hounds-ring",
40+
"purple-boats-bake",
41+
"rude-lobsters-design",
42+
"small-rocks-grab",
43+
"sweet-parents-hug",
44+
"unlucky-pigs-chew"
45+
]
3246
}

packages/create-react-router/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# `create-react-router`
22

3+
## 7.6.1-pre.0
4+
35
## 7.6.0
46

57
_No changes_

packages/create-react-router/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-react-router",
3-
"version": "7.6.0",
3+
"version": "7.6.1-pre.0",
44
"description": "Create a new React Router app",
55
"homepage": "https://reactrouter.com",
66
"bugs": {

packages/react-router-architect/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# `@react-router/architect`
22

3+
## 7.6.1-pre.0
4+
5+
### Patch Changes
6+
7+
- Update `@architect/functions` from `^5.2.0` to `^7.0.0` ([#13556](https://github.com/remix-run/react-router/pull/13556))
8+
- Updated dependencies:
9+
- `react-router@7.6.1-pre.0`
10+
- `@react-router/node@7.6.1-pre.0`
11+
312
## 7.6.0
413

514
### Patch Changes

packages/react-router-architect/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-router/architect",
3-
"version": "7.6.0",
3+
"version": "7.6.1-pre.0",
44
"description": "Architect server request handler for React Router",
55
"bugs": {
66
"url": "https://github.com/remix-run/react-router/issues"

packages/react-router-cloudflare/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# `@react-router/cloudflare`
22

3+
## 7.6.1-pre.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@7.6.1-pre.0`
9+
310
## 7.6.0
411

512
### Patch Changes

packages/react-router-cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-router/cloudflare",
3-
"version": "7.6.0",
3+
"version": "7.6.1-pre.0",
44
"description": "Cloudflare platform abstractions for React Router",
55
"bugs": {
66
"url": "https://github.com/remix-run/react-router/issues"

packages/react-router-dev/CHANGELOG.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,117 @@
11
# `@react-router/dev`
22

3+
## 7.6.1-pre.0
4+
5+
### Patch Changes
6+
7+
- Prevent typegen with route files are outside the app directory ([#12996](https://github.com/remix-run/react-router/pull/12996))
8+
- Fix typegen when same route is used at multiple paths ([#13574](https://github.com/remix-run/react-router/pull/13574))
9+
10+
For example, `routes/route.tsx` is used at 4 different paths here:
11+
12+
```ts
13+
import { type RouteConfig, route } from "@react-router/dev/routes";
14+
export default [
15+
route("base/:base", "routes/base.tsx", [
16+
route("home/:home", "routes/route.tsx", { id: "home" }),
17+
route("changelog/:changelog", "routes/route.tsx", { id: "changelog" }),
18+
route("splat/*", "routes/route.tsx", { id: "splat" }),
19+
]),
20+
route("other/:other", "routes/route.tsx", { id: "other" }),
21+
] satisfies RouteConfig;
22+
```
23+
24+
Previously, typegen would arbitrarily pick one of these paths to be the "winner" and generate types for the route module based on that path.
25+
Now, typegen creates unions as necessary for alternate paths for the same route file.
26+
27+
- Add additional logging to `build` command output when cleaning assets from server build ([#13547](https://github.com/remix-run/react-router/pull/13547))
28+
- Better types for `params` ([#13543](https://github.com/remix-run/react-router/pull/13543))
29+
30+
For example:
31+
32+
```ts
33+
// routes.ts
34+
import { type RouteConfig, route } from "@react-router/dev/routes";
35+
36+
export default [
37+
route("parent/:p", "routes/parent.tsx", [
38+
route("route/:r", "routes/route.tsx", [
39+
route("child1/:c1a/:c1b", "routes/child1.tsx"),
40+
route("child2/:c2a/:c2b", "routes/child2.tsx"),
41+
]),
42+
]),
43+
] satisfies RouteConfig;
44+
```
45+
46+
Previously, `params` for `routes/route` were calculated as `{ p: string, r: string }`.
47+
This incorrectly ignores params that could come from child routes.
48+
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 }`.
49+
50+
Now, `params` are aware of child routes and autocompletion will include child params as optionals:
51+
52+
```ts
53+
params.|
54+
// ^ cursor is here and you ask for autocompletion
55+
// p: string
56+
// r: string
57+
// c1a?: string
58+
// c1b?: string
59+
// c2a?: string
60+
// c2b?: string
61+
```
62+
63+
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`:
64+
65+
```ts
66+
if (typeof params.c1a === 'string') {
67+
params.|
68+
// ^ cursor is here and you ask for autocompletion
69+
// p: string
70+
// r: string
71+
// c1a: string
72+
// c1b: string
73+
}
74+
```
75+
76+
***
77+
78+
UNSTABLE: renamed internal `react-router/route-module` export to `react-router/internal`
79+
UNSTABLE: removed `Info` export from generated `+types/*` files
80+
81+
- [UNSTABLE] Normalize dirent entry path across node versions when generating SRI manifest ([#13591](https://github.com/remix-run/react-router/pull/13591))
82+
- 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))
83+
- Fix `href` for optional segments ([#13595](https://github.com/remix-run/react-router/pull/13595))
84+
85+
Type generation now expands paths with optionals into their corresponding non-optional paths.
86+
For example, the path `/user/:id?` gets expanded into `/user` and `/user/:id` to more closely model visitable URLs.
87+
`href` then uses these expanded (non-optional) paths to construct type-safe paths for your app:
88+
89+
```ts
90+
// original: /user/:id?
91+
// expanded: /user & /user/:id
92+
href("/user"); //
93+
href("/user/:id", { id: 1 }); //
94+
```
95+
96+
This becomes even more important for static optional paths where there wasn't a good way to indicate whether the optional should be included in the resulting path:
97+
98+
```ts
99+
// original: /products/:id/detail?
100+
101+
// before
102+
href("/products/:id/detail?"); // ❌ How can we tell `href` to include or omit `detail?` segment with a complex API?
103+
104+
// now
105+
// expanded: /products/:id & /products/:id/detail
106+
href("/product/:id"); //
107+
href("/product/:id/detail"); //
108+
```
109+
110+
- Updated dependencies:
111+
- `react-router@7.6.1-pre.0`
112+
- `@react-router/node@7.6.1-pre.0`
113+
- `@react-router/serve@7.6.1-pre.0`
114+
3115
## 7.6.0
4116

5117
### Minor Changes

packages/react-router-dev/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-router/dev",
3-
"version": "7.6.0",
3+
"version": "7.6.1-pre.0",
44
"description": "Dev tools and CLI for React Router",
55
"homepage": "https://reactrouter.com",
66
"bugs": {

packages/react-router-dom/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# react-router-dom
22

3+
## 7.6.1-pre.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@7.6.1-pre.0`
9+
310
## 7.6.0
411

512
### Patch Changes

packages/react-router-dom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-dom",
3-
"version": "7.6.0",
3+
"version": "7.6.1-pre.0",
44
"description": "Declarative routing for React web applications",
55
"keywords": [
66
"react",

packages/react-router-express/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# `@react-router/express`
22

3+
## 7.6.1-pre.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@7.6.1-pre.0`
9+
- `@react-router/node@7.6.1-pre.0`
10+
311
## 7.6.0
412

513
### Patch Changes

packages/react-router-express/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-router/express",
3-
"version": "7.6.0",
3+
"version": "7.6.1-pre.0",
44
"description": "Express server request handler for React Router",
55
"bugs": {
66
"url": "https://github.com/remix-run/react-router/issues"

packages/react-router-fs-routes/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# `@react-router/fs-routes`
22

3+
## 7.6.1-pre.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `@react-router/dev@7.6.1-pre.0`
9+
310
## 7.6.0
411

512
### Patch Changes

packages/react-router-fs-routes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-router/fs-routes",
3-
"version": "7.6.0",
3+
"version": "7.6.1-pre.0",
44
"description": "File system routing conventions for React Router, for use within routes.ts",
55
"bugs": {
66
"url": "https://github.com/remix-run/react-router/issues"

packages/react-router-node/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# `@react-router/node`
22

3+
## 7.6.1-pre.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@7.6.1-pre.0`
9+
310
## 7.6.0
411

512
### Patch Changes

packages/react-router-node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-router/node",
3-
"version": "7.6.0",
3+
"version": "7.6.1-pre.0",
44
"description": "Node.js platform abstractions for React Router",
55
"bugs": {
66
"url": "https://github.com/remix-run/react-router/issues"

packages/react-router-remix-routes-option-adapter/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# `@react-router/remix-config-routes-adapter`
22

3+
## 7.6.1-pre.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `@react-router/dev@7.6.1-pre.0`
9+
310
## 7.6.0
411

512
### Patch Changes

packages/react-router-remix-routes-option-adapter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-router/remix-routes-option-adapter",
3-
"version": "7.6.0",
3+
"version": "7.6.1-pre.0",
44
"description": "Adapter for Remix's \"routes\" config option, for use within routes.ts",
55
"bugs": {
66
"url": "https://github.com/remix-run/react-router/issues"

packages/react-router-serve/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# `@react-router/serve`
22

3+
## 7.6.1-pre.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@7.6.1-pre.0`
9+
- `@react-router/node@7.6.1-pre.0`
10+
- `@react-router/express@7.6.1-pre.0`
11+
312
## 7.6.0
413

514
### Patch Changes

packages/react-router-serve/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-router/serve",
3-
"version": "7.6.0",
3+
"version": "7.6.1-pre.0",
44
"description": "Production application server for React Router",
55
"bugs": {
66
"url": "https://github.com/remix-run/react-router/issues"

0 commit comments

Comments
 (0)