Skip to content

Commit 1a48ae5

Browse files
committed
Merge branch 'release-next'
2 parents e01a4d7 + a51b35d commit 1a48ae5

File tree

28 files changed

+217
-59
lines changed

28 files changed

+217
-59
lines changed

CHANGELOG.md

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@ We manage release notes in this file instead of the paginated Github Releases Pa
3131
- [Minor Changes](#minor-changes)
3232
- [Patch Changes](#patch-changes)
3333
- [Changes by Package](#changes-by-package)
34-
- [**Full Changelog**: `v6.28.0...v7.0.0`](#full-changelog-v6280v700)
3534
- [v6.28.0](#v6280)
3635
- [What's Changed](#whats-changed)
3736
- [Minor Changes](#minor-changes-1)
3837
- [Patch Changes](#patch-changes-1)
39-
- [\<\<\<\<\<\<\< HEAD](#-head)
4038
- [v6.27.0](#v6270)
4139
- [What's Changed](#whats-changed-1)
4240
- [Stabilized APIs](#stabilized-apis)
@@ -248,6 +246,57 @@ Date: YYYY-MM-DD
248246
**Full Changelog**: [`v7.X.Y...v7.X.Y`](https://github.com/remix-run/react-router/compare/[email protected]@7.X.Y)
249247
-->
250248

249+
## v7.0.2
250+
251+
Date: 2024-12-02
252+
253+
### Patch Changes
254+
255+
- Temporarily only use one build in export map so packages can have a peer dependency on react router ([#12437](https://github.com/remix-run/react-router/pull/12437))
256+
- Support `moduleResolution` `Node16` and `NodeNext` ([#12440](https://github.com/remix-run/react-router/pull/12440))
257+
- Generate wide `matches` and `params` types for child routes ([#12397](https://github.com/remix-run/react-router/pull/12397))
258+
259+
At runtime, `matches` includes child route matches and `params` include child route path parameters.
260+
But previously, we only generated types for parent routes and the current route in `matches` and `params`.
261+
To align our generated types more closely to the runtime behavior, we now generate more permissive, wider types when accessing child route information.
262+
263+
### Changes by Package
264+
265+
- [`react-router`](https://github.com/remix-run/react-router/blob/react-router%407.0.2/packages/react-router/CHANGELOG.md#702)
266+
- [`@react-router/architect`](https://github.com/remix-run/react-router/blob/react-router%407.0.2/packages/react-router-architect/CHANGELOG.md#702)
267+
- [`@react-router/cloudflare`](https://github.com/remix-run/react-router/blob/react-router%407.0.2/packages/react-router-cloudflare/CHANGELOG.md#702)
268+
- [`@react-router/dev`](https://github.com/remix-run/react-router/blob/react-router%407.0.2/packages/react-router-dev/CHANGELOG.md#702)
269+
- [`@react-router/express`](https://github.com/remix-run/react-router/blob/react-router%407.0.2/packages/react-router-express/CHANGELOG.md#702)
270+
- [`@react-router/fs-routes`](https://github.com/remix-run/react-router/blob/react-router%407.0.2/packages/react-router-fs-routes/CHANGELOG.md#702)
271+
- [`@react-router/node`](https://github.com/remix-run/react-router/blob/react-router%407.0.2/packages/react-router-node/CHANGELOG.md#702)
272+
- [`@react-router/remix-config-routes-adapter`](https://github.com/remix-run/react-router/blob/react-router%407.0.2/packages/react-router-remix-config-routes-adapter/CHANGELOG.md#702)
273+
- [`@react-router/serve`](https://github.com/remix-run/react-router/blob/react-router%407.0.2/packages/react-router-serve/CHANGELOG.md#702)
274+
275+
**Full Changelog**: [`v7.0.1...v7.0.2`](https://github.com/remix-run/react-router/compare/[email protected]@7.0.2)
276+
277+
## v7.0.1
278+
279+
Date: 2024-12-02
280+
281+
### Patch Changes
282+
283+
- Ensure typegen file watcher is cleaned up when Vite dev server restarts ([#12331](https://github.com/remix-run/react-router/pull/12331))
284+
- Pass route error to ErrorBoundary as a prop ([#12338](https://github.com/remix-run/react-router/pull/12338))
285+
286+
### Changes by Package
287+
288+
- [`react-router`](https://github.com/remix-run/react-router/blob/react-router%407.0.1/packages/react-router/CHANGELOG.md#701)
289+
- [`@react-router/architect`](https://github.com/remix-run/react-router/blob/react-router%407.0.1/packages/react-router-architect/CHANGELOG.md#701)
290+
- [`@react-router/cloudflare`](https://github.com/remix-run/react-router/blob/react-router%407.0.1/packages/react-router-cloudflare/CHANGELOG.md#701)
291+
- [`@react-router/dev`](https://github.com/remix-run/react-router/blob/react-router%407.0.1/packages/react-router-dev/CHANGELOG.md#701)
292+
- [`@react-router/express`](https://github.com/remix-run/react-router/blob/react-router%407.0.1/packages/react-router-express/CHANGELOG.md#701)
293+
- [`@react-router/fs-routes`](https://github.com/remix-run/react-router/blob/react-router%407.0.1/packages/react-router-fs-routes/CHANGELOG.md#701)
294+
- [`@react-router/node`](https://github.com/remix-run/react-router/blob/react-router%407.0.1/packages/react-router-node/CHANGELOG.md#701)
295+
- [`@react-router/remix-config-routes-adapter`](https://github.com/remix-run/react-router/blob/react-router%407.0.1/packages/react-router-remix-config-routes-adapter/CHANGELOG.md#701)
296+
- [`@react-router/serve`](https://github.com/remix-run/react-router/blob/react-router%407.0.1/packages/react-router-serve/CHANGELOG.md#701)
297+
298+
**Full Changelog**: [`v7.0.0...v7.0.1`](https://github.com/remix-run/react-router/compare/[email protected]@7.0.1)
299+
251300
## v7.0.0
252301

253302
Date: 2024-11-21

integration/typegen-test.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ test.describe("typegen", () => {
5555
import type { Route } from "./+types/product"
5656
5757
export function loader({ params }: Route.LoaderArgs) {
58-
type Test = Expect<Equal<typeof params.id, string>>
58+
type Test1 = Expect<Equal<typeof params.id, string>>
59+
type Test2 = Expect<Equal<typeof params.asdf, string | undefined>>
5960
return { planet: "world" }
6061
}
6162
@@ -281,12 +282,25 @@ test.describe("typegen", () => {
281282
import { Expect, Equal } from "../expect-type"
282283
import type { Route } from "./+types/current"
283284
285+
export function loader() {
286+
return { current: 3 }
287+
}
288+
284289
export function meta({ matches }: Route.MetaArgs) {
285290
const parent1 = matches[1]
286291
type Test1 = Expect<Equal<typeof parent1.data, { parent1: number }>>
287292
288293
const parent2 = matches[2]
289294
type Test2 = Expect<Equal<typeof parent2.data, { parent2: number }>>
295+
296+
const current = matches[3]
297+
type Test3 = Expect<Equal<typeof current.data, { current: number }>>
298+
299+
const child1 = matches[4]
300+
type Test4a = Expect<undefined extends typeof child1 ? true : false>
301+
if (child1) {
302+
type Test4b = Expect<Equal<typeof child1.data, unknown>>
303+
}
290304
return []
291305
}
292306
@@ -296,6 +310,15 @@ test.describe("typegen", () => {
296310
297311
const parent2 = matches[2]
298312
type Test2 = Expect<Equal<typeof parent2.data, { parent2: number }>>
313+
314+
const current = matches[3]
315+
type Test3 = Expect<Equal<typeof current.data, { current: number }>>
316+
317+
const child1 = matches[4]
318+
type Test4a = Expect<undefined extends typeof child1 ? true : false>
319+
if (child1) {
320+
type Test4b = Expect<Equal<typeof child1.data, unknown>>
321+
}
299322
}
300323
`,
301324
});

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.0.2
4+
35
## 7.0.1
46

57
## 7.0.0

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.0.1",
3+
"version": "7.0.2",
44
"description": "Create a new React Router app",
55
"homepage": "https://reactrouter.com",
66
"bugs": {

packages/react-router-architect/CHANGELOG.md

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

3+
## 7.0.2
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
9+
- `@react-router/[email protected]`
10+
311
## 7.0.1
412

513
### 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.0.1",
3+
"version": "7.0.2",
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.0.2
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
9+
310
## 7.0.1
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.0.1",
3+
"version": "7.0.2",
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: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
11
# `@react-router/dev`
22

3+
## 7.0.2
4+
5+
### Patch Changes
6+
7+
- Support `moduleResolution` `Node16` and `NodeNext` ([#12440](https://github.com/remix-run/react-router/pull/12440))
8+
9+
- Generate wide `matches` and `params` types for current route and child routes ([#12397](https://github.com/remix-run/react-router/pull/12397))
10+
11+
At runtime, `matches` includes child route matches and `params` include child route path parameters.
12+
But previously, we only generated types for parent routes in `matches`; for `params`, we only considered the parent routes and the current route.
13+
To align our generated types more closely to the runtime behavior, we now generate more permissive, wider types when accessing child route information.
14+
15+
- Updated dependencies:
16+
17+
- `@react-router/[email protected]`
18+
- `@react-router/[email protected]`
19+
320
## 7.0.1
421

522
### Patch Changes
623

24+
- Pass route error to ErrorBoundary as a prop ([#12338](https://github.com/remix-run/react-router/pull/12338))
725
- Ensure typegen file watcher is cleaned up when Vite dev server restarts ([#12331](https://github.com/remix-run/react-router/pull/12331))
826
- Updated dependencies:
927
@@ -26,7 +44,7 @@
2644
+import { cloudflareDevProxy } from "@react-router/dev/vite/cloudflare";
2745
```
2846

29-
- Remove single_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
47+
- Remove single\_fetch future flag. ([#11522](https://github.com/remix-run/react-router/pull/11522))
3048

3149
- update minimum node version to 18 ([#11690](https://github.com/remix-run/react-router/pull/11690))
3250

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.0.1",
3+
"version": "7.0.2",
44
"description": "Dev tools and CLI for React Router",
55
"homepage": "https://reactrouter.com",
66
"bugs": {

0 commit comments

Comments
 (0)