Skip to content

chore: Update version for release (pre) #13637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,19 @@
"@playground/split-route-modules-spa": "0.0.0",
"@playground/vite-plugin-cloudflare": "0.0.0"
},
"changesets": []
"changesets": [
"big-ladybugs-brush",
"flat-seas-own",
"funny-paws-divide",
"gold-baboons-roll",
"gold-socks-attack",
"loud-actors-shop",
"neat-candles-stare",
"odd-hounds-ring",
"purple-boats-bake",
"rude-lobsters-design",
"small-rocks-grab",
"sweet-parents-hug",
"unlucky-pigs-chew"
]
}
2 changes: 2 additions & 0 deletions packages/create-react-router/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# `create-react-router`

## 7.6.1-pre.0

## 7.6.0

_No changes_
Expand Down
2 changes: 1 addition & 1 deletion packages/create-react-router/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-react-router",
"version": "7.6.0",
"version": "7.6.1-pre.0",
"description": "Create a new React Router app",
"homepage": "https://reactrouter.com",
"bugs": {
Expand Down
9 changes: 9 additions & 0 deletions packages/react-router-architect/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# `@react-router/architect`

## 7.6.1-pre.0

### Patch Changes

- Update `@architect/functions` from `^5.2.0` to `^7.0.0` ([#13556](https://github.com/remix-run/react-router/pull/13556))
- Updated dependencies:
- `[email protected]`
- `@react-router/[email protected]`

## 7.6.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-architect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/architect",
"version": "7.6.0",
"version": "7.6.1-pre.0",
"description": "Architect server request handler for React Router",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
7 changes: 7 additions & 0 deletions packages/react-router-cloudflare/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@react-router/cloudflare`

## 7.6.1-pre.0

### Patch Changes

- Updated dependencies:
- `[email protected]`

## 7.6.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-cloudflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/cloudflare",
"version": "7.6.0",
"version": "7.6.1-pre.0",
"description": "Cloudflare platform abstractions for React Router",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
112 changes: 112 additions & 0 deletions packages/react-router-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,117 @@
# `@react-router/dev`

## 7.6.1-pre.0

### Patch Changes

- Prevent typegen with route files are outside the app directory ([#12996](https://github.com/remix-run/react-router/pull/12996))
- Fix typegen when same route is used at multiple paths ([#13574](https://github.com/remix-run/react-router/pull/13574))

For example, `routes/route.tsx` is used at 4 different paths here:

```ts
import { type RouteConfig, route } from "@react-router/dev/routes";
export default [
route("base/:base", "routes/base.tsx", [
route("home/:home", "routes/route.tsx", { id: "home" }),
route("changelog/:changelog", "routes/route.tsx", { id: "changelog" }),
route("splat/*", "routes/route.tsx", { id: "splat" }),
]),
route("other/:other", "routes/route.tsx", { id: "other" }),
] satisfies RouteConfig;
```

Previously, typegen would arbitrarily pick one of these paths to be the "winner" and generate types for the route module based on that path.
Now, typegen creates unions as necessary for alternate paths for the same route file.

- Add additional logging to `build` command output when cleaning assets from server build ([#13547](https://github.com/remix-run/react-router/pull/13547))
- Better types for `params` ([#13543](https://github.com/remix-run/react-router/pull/13543))

For example:

```ts
// routes.ts
import { type RouteConfig, route } from "@react-router/dev/routes";

export default [
route("parent/:p", "routes/parent.tsx", [
route("route/:r", "routes/route.tsx", [
route("child1/:c1a/:c1b", "routes/child1.tsx"),
route("child2/:c2a/:c2b", "routes/child2.tsx"),
]),
]),
] satisfies RouteConfig;
```

Previously, `params` for `routes/route` were calculated as `{ p: string, r: string }`.
This incorrectly ignores params that could come from child routes.
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 }`.

Now, `params` are aware of child routes and autocompletion will include child params as optionals:

```ts
params.|
// ^ cursor is here and you ask for autocompletion
// p: string
// r: string
// c1a?: string
// c1b?: string
// c2a?: string
// c2b?: string
```

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`:

```ts
if (typeof params.c1a === 'string') {
params.|
// ^ cursor is here and you ask for autocompletion
// p: string
// r: string
// c1a: string
// c1b: string
}
```

***

UNSTABLE: renamed internal `react-router/route-module` export to `react-router/internal`
UNSTABLE: removed `Info` export from generated `+types/*` files

- [UNSTABLE] Normalize dirent entry path across node versions when generating SRI manifest ([#13591](https://github.com/remix-run/react-router/pull/13591))
- 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))
- Fix `href` for optional segments ([#13595](https://github.com/remix-run/react-router/pull/13595))

Type generation now expands paths with optionals into their corresponding non-optional paths.
For example, the path `/user/:id?` gets expanded into `/user` and `/user/:id` to more closely model visitable URLs.
`href` then uses these expanded (non-optional) paths to construct type-safe paths for your app:

```ts
// original: /user/:id?
// expanded: /user & /user/:id
href("/user"); // ✅
href("/user/:id", { id: 1 }); // ✅
```

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:

```ts
// original: /products/:id/detail?

// before
href("/products/:id/detail?"); // ❌ How can we tell `href` to include or omit `detail?` segment with a complex API?

// now
// expanded: /products/:id & /products/:id/detail
href("/product/:id"); // ✅
href("/product/:id/detail"); // ✅
```

- Updated dependencies:
- `[email protected]`
- `@react-router/[email protected]`
- `@react-router/[email protected]`

## 7.6.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/dev",
"version": "7.6.0",
"version": "7.6.1-pre.0",
"description": "Dev tools and CLI for React Router",
"homepage": "https://reactrouter.com",
"bugs": {
Expand Down
7 changes: 7 additions & 0 deletions packages/react-router-dom/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# react-router-dom

## 7.6.1-pre.0

### Patch Changes

- Updated dependencies:
- `[email protected]`

## 7.6.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-dom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-router-dom",
"version": "7.6.0",
"version": "7.6.1-pre.0",
"description": "Declarative routing for React web applications",
"keywords": [
"react",
Expand Down
8 changes: 8 additions & 0 deletions packages/react-router-express/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# `@react-router/express`

## 7.6.1-pre.0

### Patch Changes

- Updated dependencies:
- `[email protected]`
- `@react-router/[email protected]`

## 7.6.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-express/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/express",
"version": "7.6.0",
"version": "7.6.1-pre.0",
"description": "Express server request handler for React Router",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
7 changes: 7 additions & 0 deletions packages/react-router-fs-routes/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@react-router/fs-routes`

## 7.6.1-pre.0

### Patch Changes

- Updated dependencies:
- `@react-router/[email protected]`

## 7.6.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-fs-routes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/fs-routes",
"version": "7.6.0",
"version": "7.6.1-pre.0",
"description": "File system routing conventions for React Router, for use within routes.ts",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
7 changes: 7 additions & 0 deletions packages/react-router-node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@react-router/node`

## 7.6.1-pre.0

### Patch Changes

- Updated dependencies:
- `[email protected]`

## 7.6.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/node",
"version": "7.6.0",
"version": "7.6.1-pre.0",
"description": "Node.js platform abstractions for React Router",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# `@react-router/remix-config-routes-adapter`

## 7.6.1-pre.0

### Patch Changes

- Updated dependencies:
- `@react-router/[email protected]`

## 7.6.0

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/remix-routes-option-adapter",
"version": "7.6.0",
"version": "7.6.1-pre.0",
"description": "Adapter for Remix's \"routes\" config option, for use within routes.ts",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
9 changes: 9 additions & 0 deletions packages/react-router-serve/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# `@react-router/serve`

## 7.6.1-pre.0

### Patch Changes

- Updated dependencies:
- `[email protected]`
- `@react-router/[email protected]`
- `@react-router/[email protected]`

## 7.6.0

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router-serve/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-router/serve",
"version": "7.6.0",
"version": "7.6.1-pre.0",
"description": "Production application server for React Router",
"bugs": {
"url": "https://github.com/remix-run/react-router/issues"
Expand Down
Loading