Skip to content

Commit 703892c

Browse files
committed
Merge branch 'release-next'
2 parents cc4436c + 08cda17 commit 703892c

File tree

20 files changed

+535
-151
lines changed

20 files changed

+535
-151
lines changed

CHANGELOG.md

Lines changed: 52 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -13,134 +13,135 @@ We manage release notes in this file instead of the paginated Github Releases Pa
1313
<summary>Table of Contents</summary>
1414

1515
- [React Router Releases](#react-router-releases)
16+
- [v6.21.1](#v6211)
17+
- [Patch Changes](#patch-changes)
1618
- [v6.21.0](#v6210)
1719
- [What's Changed](#whats-changed)
1820
- [`future.v7_relativeSplatPath`](#futurev7_relativesplatpath)
1921
- [Partial Hydration](#partial-hydration)
2022
- [Minor Changes](#minor-changes)
21-
- [Patch Changes](#patch-changes)
22-
- [v6.20.1](#v6201)
2323
- [Patch Changes](#patch-changes-1)
24+
- [v6.20.1](#v6201)
25+
- [Patch Changes](#patch-changes-2)
2426
- [v6.20.0](#v6200)
2527
- [Minor Changes](#minor-changes-1)
26-
- [Patch Changes](#patch-changes-2)
28+
- [Patch Changes](#patch-changes-3)
2729
- [v6.19.0](#v6190)
2830
- [What's Changed](#whats-changed-1)
2931
- [`unstable_flushSync` API](#unstable_flushsync-api)
3032
- [Minor Changes](#minor-changes-2)
31-
- [Patch Changes](#patch-changes-3)
33+
- [Patch Changes](#patch-changes-4)
3234
- [v6.18.0](#v6180)
3335
- [What's Changed](#whats-changed-2)
3436
- [New Fetcher APIs](#new-fetcher-apis)
3537
- [Persistence Future Flag (`future.v7_fetcherPersist`)](#persistence-future-flag-futurev7_fetcherpersist)
3638
- [Minor Changes](#minor-changes-3)
37-
- [Patch Changes](#patch-changes-4)
39+
- [Patch Changes](#patch-changes-5)
3840
- [v6.17.0](#v6170)
3941
- [What's Changed](#whats-changed-3)
4042
- [View Transitions 🚀](#view-transitions-)
4143
- [Minor Changes](#minor-changes-4)
42-
- [Patch Changes](#patch-changes-5)
44+
- [Patch Changes](#patch-changes-6)
4345
- [v6.16.0](#v6160)
4446
- [Minor Changes](#minor-changes-5)
45-
- [Patch Changes](#patch-changes-6)
47+
- [Patch Changes](#patch-changes-7)
4648
- [v6.15.0](#v6150)
4749
- [Minor Changes](#minor-changes-6)
48-
- [Patch Changes](#patch-changes-7)
49-
- [v6.14.2](#v6142)
5050
- [Patch Changes](#patch-changes-8)
51-
- [v6.14.1](#v6141)
51+
- [v6.14.2](#v6142)
5252
- [Patch Changes](#patch-changes-9)
53+
- [v6.14.1](#v6141)
54+
- [Patch Changes](#patch-changes-10)
5355
- [v6.14.0](#v6140)
5456
- [What's Changed](#whats-changed-4)
5557
- [JSON/Text Submissions](#jsontext-submissions)
5658
- [Minor Changes](#minor-changes-7)
57-
- [Patch Changes](#patch-changes-10)
59+
- [Patch Changes](#patch-changes-11)
5860
- [v6.13.0](#v6130)
5961
- [What's Changed](#whats-changed-5)
6062
- [Minor Changes](#minor-changes-8)
61-
- [Patch Changes](#patch-changes-11)
62-
- [v6.12.1](#v6121)
6363
- [Patch Changes](#patch-changes-12)
64+
- [v6.12.1](#v6121)
65+
- [Patch Changes](#patch-changes-13)
6466
- [v6.12.0](#v6120)
6567
- [What's Changed](#whats-changed-6)
6668
- [`React.startTransition` support](#reactstarttransition-support)
6769
- [Minor Changes](#minor-changes-9)
68-
- [Patch Changes](#patch-changes-13)
69-
- [v6.11.2](#v6112)
7070
- [Patch Changes](#patch-changes-14)
71-
- [v6.11.1](#v6111)
71+
- [v6.11.2](#v6112)
7272
- [Patch Changes](#patch-changes-15)
73+
- [v6.11.1](#v6111)
74+
- [Patch Changes](#patch-changes-16)
7375
- [v6.11.0](#v6110)
7476
- [Minor Changes](#minor-changes-10)
75-
- [Patch Changes](#patch-changes-16)
77+
- [Patch Changes](#patch-changes-17)
7678
- [v6.10.0](#v6100)
7779
- [What's Changed](#whats-changed-7)
7880
- [Minor Changes](#minor-changes-11)
79-
- [Patch Changes](#patch-changes-17)
81+
- [Patch Changes](#patch-changes-18)
8082
- [v6.9.0](#v690)
8183
- [What's Changed](#whats-changed-8)
8284
- [`Component`/`ErrorBoundary` route properties](#componenterrorboundary-route-properties)
8385
- [Introducing Lazy Route Modules](#introducing-lazy-route-modules)
8486
- [Minor Changes](#minor-changes-12)
85-
- [Patch Changes](#patch-changes-18)
86-
- [v6.8.2](#v682)
8787
- [Patch Changes](#patch-changes-19)
88-
- [v6.8.1](#v681)
88+
- [v6.8.2](#v682)
8989
- [Patch Changes](#patch-changes-20)
90+
- [v6.8.1](#v681)
91+
- [Patch Changes](#patch-changes-21)
9092
- [v6.8.0](#v680)
9193
- [Minor Changes](#minor-changes-13)
92-
- [Patch Changes](#patch-changes-21)
94+
- [Patch Changes](#patch-changes-22)
9395
- [v6.7.0](#v670)
9496
- [Minor Changes](#minor-changes-14)
95-
- [Patch Changes](#patch-changes-22)
96-
- [v6.6.2](#v662)
9797
- [Patch Changes](#patch-changes-23)
98-
- [v6.6.1](#v661)
98+
- [v6.6.2](#v662)
9999
- [Patch Changes](#patch-changes-24)
100+
- [v6.6.1](#v661)
101+
- [Patch Changes](#patch-changes-25)
100102
- [v6.6.0](#v660)
101103
- [What's Changed](#whats-changed-9)
102104
- [Minor Changes](#minor-changes-15)
103-
- [Patch Changes](#patch-changes-25)
105+
- [Patch Changes](#patch-changes-26)
104106
- [v6.5.0](#v650)
105107
- [What's Changed](#whats-changed-10)
106108
- [Minor Changes](#minor-changes-16)
107-
- [Patch Changes](#patch-changes-26)
108-
- [v6.4.5](#v645)
109109
- [Patch Changes](#patch-changes-27)
110-
- [v6.4.4](#v644)
110+
- [v6.4.5](#v645)
111111
- [Patch Changes](#patch-changes-28)
112-
- [v6.4.3](#v643)
112+
- [v6.4.4](#v644)
113113
- [Patch Changes](#patch-changes-29)
114-
- [v6.4.2](#v642)
114+
- [v6.4.3](#v643)
115115
- [Patch Changes](#patch-changes-30)
116-
- [v6.4.1](#v641)
116+
- [v6.4.2](#v642)
117117
- [Patch Changes](#patch-changes-31)
118+
- [v6.4.1](#v641)
119+
- [Patch Changes](#patch-changes-32)
118120
- [v6.4.0](#v640)
119121
- [What's Changed](#whats-changed-11)
120122
- [Remix Data APIs](#remix-data-apis)
121-
- [Patch Changes](#patch-changes-32)
123+
- [Patch Changes](#patch-changes-33)
122124
- [v6.3.0](#v630)
123125
- [Minor Changes](#minor-changes-17)
124126
- [v6.2.2](#v622)
125-
- [Patch Changes](#patch-changes-33)
126-
- [v6.2.1](#v621)
127127
- [Patch Changes](#patch-changes-34)
128+
- [v6.2.1](#v621)
129+
- [Patch Changes](#patch-changes-35)
128130
- [v6.2.0](#v620)
129131
- [Minor Changes](#minor-changes-18)
130-
- [Patch Changes](#patch-changes-35)
131-
- [v6.1.1](#v611)
132132
- [Patch Changes](#patch-changes-36)
133+
- [v6.1.1](#v611)
134+
- [Patch Changes](#patch-changes-37)
133135
- [v6.1.0](#v610)
134136
- [Minor Changes](#minor-changes-19)
135-
- [Patch Changes](#patch-changes-37)
136-
- [v6.0.1](#v601)
137137
- [Patch Changes](#patch-changes-38)
138+
- [v6.0.1](#v601)
139+
- [Patch Changes](#patch-changes-39)
138140
- [v6.0.0](#v600)
139141

140142
</details>
141143

142-
<!--
143-
To add a new release, copy from this template:
144+
<!-- To add a new release, copy from this template:
144145
145146
## v6.X.Y
146147
@@ -155,9 +156,18 @@ To add a new release, copy from this template:
155156
### Patch Changes
156157
157158
**Full Changelog**: [`v6.X.Y...v6.X.Y`](https://github.com/remix-run/react-router/compare/[email protected]@6.X.Y)
158-
159159
-->
160160

161+
## v6.21.1
162+
163+
### Patch Changes
164+
165+
- Fix bug with `route.lazy` not working correctly on initial SPA load when `v7_partialHydration` is specified ([#11121](https://github.com/remix-run/react-router/pull/11121))
166+
- Fix bug preventing revalidation from occurring for persisted fetchers unmounted during the `submitting` phase ([#11102](https://github.com/remix-run/react-router/pull/11102))
167+
- De-dup relative path logic in `resolveTo` ([#11097](https://github.com/remix-run/react-router/pull/11097))
168+
169+
**Full Changelog**: [`v6.21.0...v6.21.1`](https://github.com/remix-run/react-router/compare/[email protected]@6.21.1)
170+
161171
## v6.21.0
162172

163173
### What's Changed

packages/react-router-dom-v5-compat/CHANGELOG.md

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

3+
## 6.21.1
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
9+
10+
311
## 6.21.0
412

513
### Minor Changes

packages/react-router-dom-v5-compat/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-dom-v5-compat",
3-
"version": "6.21.0",
3+
"version": "6.21.1",
44
"description": "Migration path to React Router v6 from v4/5",
55
"keywords": [
66
"react",
@@ -24,7 +24,7 @@
2424
"types": "./dist/index.d.ts",
2525
"dependencies": {
2626
"history": "^5.3.0",
27-
"react-router": "6.21.0"
27+
"react-router": "6.21.1"
2828
},
2929
"peerDependencies": {
3030
"react": ">=16.8",

packages/react-router-dom/CHANGELOG.md

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

3+
## 6.21.1
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
9+
- `@remix-run/[email protected]`
10+
311
## 6.21.0
412

513
### Minor Changes

packages/react-router-dom/__tests__/data-browser-router-test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5712,10 +5712,10 @@ function testDomRouter(
57125712
await waitFor(() => screen.getByText("Page (1)"));
57135713
expect(getHtml(container)).toMatch("Num fetchers: 1");
57145714

5715-
// Resolve after the navigation and revalidation
5715+
// Resolve action after the navigation and trigger revalidation
57165716
dfd.resolve("FETCH");
57175717
await waitFor(() => screen.getByText("Num fetchers: 0"));
5718-
expect(getHtml(container)).toMatch("Page (1)");
5718+
expect(getHtml(container)).toMatch("Page (2)");
57195719
});
57205720

57215721
it("submitting fetchers w/revalidations are cleaned up on completion (remounted)", async () => {

packages/react-router-dom/__tests__/partial-hydration-test.tsx

Lines changed: 130 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from "react-router-dom";
1515

1616
import getHtml from "../../react-router/__tests__/utils/getHtml";
17-
import { createDeferred } from "../../router/__tests__/utils/utils";
17+
import { createDeferred, tick } from "../../router/__tests__/utils/utils";
1818

1919
let didAssertMissingHydrateFallback = false;
2020

@@ -521,4 +521,133 @@ function testPartialHydration(
521521
</div>"
522522
`);
523523
});
524+
525+
it("supports partial hydration w/lazy initial routes (leaf fallback)", async () => {
526+
let dfd = createDeferred();
527+
let router = createTestRouter(
528+
[
529+
{
530+
path: "/",
531+
Component() {
532+
return (
533+
<>
534+
<h1>Root</h1>
535+
<Outlet />
536+
</>
537+
);
538+
},
539+
children: [
540+
{
541+
id: "index",
542+
index: true,
543+
HydrateFallback: () => <p>Index Loading...</p>,
544+
async lazy() {
545+
await tick();
546+
return {
547+
loader: () => dfd.promise,
548+
Component() {
549+
let data = useLoaderData() as string;
550+
return <h2>{`Index - ${data}`}</h2>;
551+
},
552+
};
553+
},
554+
},
555+
],
556+
},
557+
],
558+
{
559+
future: {
560+
v7_partialHydration: true,
561+
},
562+
}
563+
);
564+
let { container } = render(<RouterProvider router={router} />);
565+
566+
expect(getHtml(container)).toMatchInlineSnapshot(`
567+
"<div>
568+
<h1>
569+
Root
570+
</h1>
571+
<p>
572+
Index Loading...
573+
</p>
574+
</div>"
575+
`);
576+
577+
dfd.resolve("INDEX DATA");
578+
await waitFor(() => screen.getByText(/INDEX DATA/));
579+
expect(getHtml(container)).toMatchInlineSnapshot(`
580+
"<div>
581+
<h1>
582+
Root
583+
</h1>
584+
<h2>
585+
Index - INDEX DATA
586+
</h2>
587+
</div>"
588+
`);
589+
});
590+
591+
it("supports partial hydration w/lazy initial routes (root fallback)", async () => {
592+
let dfd = createDeferred();
593+
let router = createTestRouter(
594+
[
595+
{
596+
path: "/",
597+
Component() {
598+
return (
599+
<>
600+
<h1>Root</h1>
601+
<Outlet />
602+
</>
603+
);
604+
},
605+
HydrateFallback: () => <p>Loading...</p>,
606+
children: [
607+
{
608+
id: "index",
609+
index: true,
610+
async lazy() {
611+
await tick();
612+
return {
613+
loader: () => dfd.promise,
614+
Component() {
615+
let data = useLoaderData() as string;
616+
return <h2>{`Index - ${data}`}</h2>;
617+
},
618+
};
619+
},
620+
},
621+
],
622+
},
623+
],
624+
{
625+
future: {
626+
v7_partialHydration: true,
627+
},
628+
}
629+
);
630+
let { container } = render(<RouterProvider router={router} />);
631+
632+
expect(getHtml(container)).toMatchInlineSnapshot(`
633+
"<div>
634+
<p>
635+
Loading...
636+
</p>
637+
</div>"
638+
`);
639+
640+
dfd.resolve("INDEX DATA");
641+
await waitFor(() => screen.getByText(/INDEX DATA/));
642+
expect(getHtml(container)).toMatchInlineSnapshot(`
643+
"<div>
644+
<h1>
645+
Root
646+
</h1>
647+
<h2>
648+
Index - INDEX DATA
649+
</h2>
650+
</div>"
651+
`);
652+
});
524653
}

0 commit comments

Comments
 (0)