Skip to content

Commit 95acd38

Browse files
committedFeb 27, 2024·
Merge branch 'release-next' into dev
2 parents 6b22f91 + 5f0cf32 commit 95acd38

File tree

20 files changed

+167
-72
lines changed

20 files changed

+167
-72
lines changed
 

‎.changeset/fifty-pugs-boil.md

-6
This file was deleted.

‎CHANGELOG.md

+56-44
Original file line numberDiff line numberDiff line change
@@ -13,141 +13,143 @@ 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.22.1](#v6221)
17+
- [Patch Changes](#patch-changes)
1618
- [v6.22.0](#v6220)
1719
- [What's Changed](#whats-changed)
1820
- [Core Web Vitals Technology Report Flag](#core-web-vitals-technology-report-flag)
1921
- [Minor Changes](#minor-changes)
20-
- [Patch Changes](#patch-changes)
21-
- [v6.21.3](#v6213)
2222
- [Patch Changes](#patch-changes-1)
23-
- [v6.21.2](#v6212)
23+
- [v6.21.3](#v6213)
2424
- [Patch Changes](#patch-changes-2)
25-
- [v6.21.1](#v6211)
25+
- [v6.21.2](#v6212)
2626
- [Patch Changes](#patch-changes-3)
27+
- [v6.21.1](#v6211)
28+
- [Patch Changes](#patch-changes-4)
2729
- [v6.21.0](#v6210)
2830
- [What's Changed](#whats-changed-1)
2931
- [`future.v7_relativeSplatPath`](#futurev7_relativesplatpath)
3032
- [Partial Hydration](#partial-hydration)
3133
- [Minor Changes](#minor-changes-1)
32-
- [Patch Changes](#patch-changes-4)
33-
- [v6.20.1](#v6201)
3434
- [Patch Changes](#patch-changes-5)
35+
- [v6.20.1](#v6201)
36+
- [Patch Changes](#patch-changes-6)
3537
- [v6.20.0](#v6200)
3638
- [Minor Changes](#minor-changes-2)
37-
- [Patch Changes](#patch-changes-6)
39+
- [Patch Changes](#patch-changes-7)
3840
- [v6.19.0](#v6190)
3941
- [What's Changed](#whats-changed-2)
4042
- [`unstable_flushSync` API](#unstable_flushsync-api)
4143
- [Minor Changes](#minor-changes-3)
42-
- [Patch Changes](#patch-changes-7)
44+
- [Patch Changes](#patch-changes-8)
4345
- [v6.18.0](#v6180)
4446
- [What's Changed](#whats-changed-3)
4547
- [New Fetcher APIs](#new-fetcher-apis)
4648
- [Persistence Future Flag (`future.v7_fetcherPersist`)](#persistence-future-flag-futurev7_fetcherpersist)
4749
- [Minor Changes](#minor-changes-4)
48-
- [Patch Changes](#patch-changes-8)
50+
- [Patch Changes](#patch-changes-9)
4951
- [v6.17.0](#v6170)
5052
- [What's Changed](#whats-changed-4)
5153
- [View Transitions 🚀](#view-transitions-)
5254
- [Minor Changes](#minor-changes-5)
53-
- [Patch Changes](#patch-changes-9)
55+
- [Patch Changes](#patch-changes-10)
5456
- [v6.16.0](#v6160)
5557
- [Minor Changes](#minor-changes-6)
56-
- [Patch Changes](#patch-changes-10)
58+
- [Patch Changes](#patch-changes-11)
5759
- [v6.15.0](#v6150)
5860
- [Minor Changes](#minor-changes-7)
59-
- [Patch Changes](#patch-changes-11)
60-
- [v6.14.2](#v6142)
6161
- [Patch Changes](#patch-changes-12)
62-
- [v6.14.1](#v6141)
62+
- [v6.14.2](#v6142)
6363
- [Patch Changes](#patch-changes-13)
64+
- [v6.14.1](#v6141)
65+
- [Patch Changes](#patch-changes-14)
6466
- [v6.14.0](#v6140)
6567
- [What's Changed](#whats-changed-5)
6668
- [JSON/Text Submissions](#jsontext-submissions)
6769
- [Minor Changes](#minor-changes-8)
68-
- [Patch Changes](#patch-changes-14)
70+
- [Patch Changes](#patch-changes-15)
6971
- [v6.13.0](#v6130)
7072
- [What's Changed](#whats-changed-6)
7173
- [Minor Changes](#minor-changes-9)
72-
- [Patch Changes](#patch-changes-15)
73-
- [v6.12.1](#v6121)
7474
- [Patch Changes](#patch-changes-16)
75+
- [v6.12.1](#v6121)
76+
- [Patch Changes](#patch-changes-17)
7577
- [v6.12.0](#v6120)
7678
- [What's Changed](#whats-changed-7)
7779
- [`React.startTransition` support](#reactstarttransition-support)
7880
- [Minor Changes](#minor-changes-10)
79-
- [Patch Changes](#patch-changes-17)
80-
- [v6.11.2](#v6112)
8181
- [Patch Changes](#patch-changes-18)
82-
- [v6.11.1](#v6111)
82+
- [v6.11.2](#v6112)
8383
- [Patch Changes](#patch-changes-19)
84+
- [v6.11.1](#v6111)
85+
- [Patch Changes](#patch-changes-20)
8486
- [v6.11.0](#v6110)
8587
- [Minor Changes](#minor-changes-11)
86-
- [Patch Changes](#patch-changes-20)
88+
- [Patch Changes](#patch-changes-21)
8789
- [v6.10.0](#v6100)
8890
- [What's Changed](#whats-changed-8)
8991
- [Minor Changes](#minor-changes-12)
90-
- [Patch Changes](#patch-changes-21)
92+
- [Patch Changes](#patch-changes-22)
9193
- [v6.9.0](#v690)
9294
- [What's Changed](#whats-changed-9)
9395
- [`Component`/`ErrorBoundary` route properties](#componenterrorboundary-route-properties)
9496
- [Introducing Lazy Route Modules](#introducing-lazy-route-modules)
9597
- [Minor Changes](#minor-changes-13)
96-
- [Patch Changes](#patch-changes-22)
97-
- [v6.8.2](#v682)
9898
- [Patch Changes](#patch-changes-23)
99-
- [v6.8.1](#v681)
99+
- [v6.8.2](#v682)
100100
- [Patch Changes](#patch-changes-24)
101+
- [v6.8.1](#v681)
102+
- [Patch Changes](#patch-changes-25)
101103
- [v6.8.0](#v680)
102104
- [Minor Changes](#minor-changes-14)
103-
- [Patch Changes](#patch-changes-25)
105+
- [Patch Changes](#patch-changes-26)
104106
- [v6.7.0](#v670)
105107
- [Minor Changes](#minor-changes-15)
106-
- [Patch Changes](#patch-changes-26)
107-
- [v6.6.2](#v662)
108108
- [Patch Changes](#patch-changes-27)
109-
- [v6.6.1](#v661)
109+
- [v6.6.2](#v662)
110110
- [Patch Changes](#patch-changes-28)
111+
- [v6.6.1](#v661)
112+
- [Patch Changes](#patch-changes-29)
111113
- [v6.6.0](#v660)
112114
- [What's Changed](#whats-changed-10)
113115
- [Minor Changes](#minor-changes-16)
114-
- [Patch Changes](#patch-changes-29)
116+
- [Patch Changes](#patch-changes-30)
115117
- [v6.5.0](#v650)
116118
- [What's Changed](#whats-changed-11)
117119
- [Minor Changes](#minor-changes-17)
118-
- [Patch Changes](#patch-changes-30)
119-
- [v6.4.5](#v645)
120120
- [Patch Changes](#patch-changes-31)
121-
- [v6.4.4](#v644)
121+
- [v6.4.5](#v645)
122122
- [Patch Changes](#patch-changes-32)
123-
- [v6.4.3](#v643)
123+
- [v6.4.4](#v644)
124124
- [Patch Changes](#patch-changes-33)
125-
- [v6.4.2](#v642)
125+
- [v6.4.3](#v643)
126126
- [Patch Changes](#patch-changes-34)
127-
- [v6.4.1](#v641)
127+
- [v6.4.2](#v642)
128128
- [Patch Changes](#patch-changes-35)
129+
- [v6.4.1](#v641)
130+
- [Patch Changes](#patch-changes-36)
129131
- [v6.4.0](#v640)
130132
- [What's Changed](#whats-changed-12)
131133
- [Remix Data APIs](#remix-data-apis)
132-
- [Patch Changes](#patch-changes-36)
134+
- [Patch Changes](#patch-changes-37)
133135
- [v6.3.0](#v630)
134136
- [Minor Changes](#minor-changes-18)
135137
- [v6.2.2](#v622)
136-
- [Patch Changes](#patch-changes-37)
137-
- [v6.2.1](#v621)
138138
- [Patch Changes](#patch-changes-38)
139+
- [v6.2.1](#v621)
140+
- [Patch Changes](#patch-changes-39)
139141
- [v6.2.0](#v620)
140142
- [Minor Changes](#minor-changes-19)
141-
- [Patch Changes](#patch-changes-39)
142-
- [v6.1.1](#v611)
143143
- [Patch Changes](#patch-changes-40)
144+
- [v6.1.1](#v611)
145+
- [Patch Changes](#patch-changes-41)
144146
- [v6.1.0](#v610)
145147
- [Minor Changes](#minor-changes-20)
146-
- [Patch Changes](#patch-changes-41)
147-
- [v6.0.2](#v602)
148148
- [Patch Changes](#patch-changes-42)
149-
- [v6.0.1](#v601)
149+
- [v6.0.2](#v602)
150150
- [Patch Changes](#patch-changes-43)
151+
- [v6.0.1](#v601)
152+
- [Patch Changes](#patch-changes-44)
151153
- [v6.0.0](#v600)
152154

153155
</details>
@@ -171,6 +173,16 @@ Date: YYYY-MM-DD
171173
**Full Changelog**: [`v6.X.Y...v6.X.Y`](https://github.com/remix-run/react-router/compare/react-router@6.X.Y...react-router@6.X.Y)
172174
-->
173175

176+
## v6.22.1
177+
178+
Date: 2024-02-16
179+
180+
### Patch Changes
181+
182+
- Fix encoding/decoding issues with pre-encoded dynamic parameter values ([#11199](https://github.com/remix-run/react-router/pull/11199))
183+
184+
**Full Changelog**: [`v6.22.0...v6.22.1`](https://github.com/remix-run/react-router/compare/react-router@6.22.0...react-router@6.22.1)
185+
174186
## v6.22.0
175187

176188
Date: 2024-02-01

‎contributors.yml

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- AchThomas
66
- adamdotjs
77
- adil62
8+
- adriananin
89
- adrienharnay
910
- afzalsayed96
1011
- Ajayff4
@@ -71,6 +72,7 @@
7172
- emzoumpo
7273
- engpetermwangi
7374
- ericschn
75+
- faergeek
7476
- FilipJirsak
7577
- frontsideair
7678
- fyzhu
@@ -108,6 +110,7 @@
108110
- janpaepke
109111
- jasikpark
110112
- jasonpaulos
113+
- jb-1980
111114
- jdufresne
112115
- jenseng
113116
- JeraldVin

‎docs/components/link.md

+22
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,27 @@ function EditContact() {
9191
}
9292
```
9393

94+
Please note that `relative: "path"` only impacts the resolution of a relative path. It does not change the the "starting" location for that relative path resolution. This resolution is always relative to the current location in the Route hierarchy (i.e., the route `Link` is rendered in).
95+
96+
If you wish to use path-relative routing against the current URL instead of the route hierarchy, you can do that with the current [`location`][use-location] and the `URL` constructor (note the trailing slash behavior):
97+
98+
```js
99+
// Assume the current URL is https://remix.run/docs/en/main/start/quickstart
100+
let location = useLocation();
101+
102+
// Without trailing slashes
103+
new URL(".", window.origin + location.pathname);
104+
// 'https://remix.run/docs/en/main/start/'
105+
new URL("..", window.origin + location.pathname);
106+
// 'https://remix.run/docs/en/main/'
107+
108+
// With trailing slashes:
109+
new URL(".", window.origin + location.pathname + "/");
110+
// 'https://remix.run/docs/en/main/start/future-flags/'
111+
new URL("..", window.origin + location.pathname + "/");
112+
// 'https://remix.run/docs/en/main/start/'
113+
```
114+
94115
## `preventScrollReset`
95116

96117
If you are using [`<ScrollRestoration>`][scrollrestoration], this lets you prevent the scroll position from being reset to the top of the window when the link is clicked.
@@ -205,3 +226,4 @@ function ImageLink(to) {
205226
[picking-a-router]: ../routers/picking-a-router
206227
[navlink]: ./nav-link
207228
[relativesplatpath]: ../hooks/use-resolved-path#splat-paths
229+
[use-location]: ../hooks/use-location

‎docs/guides/ssr.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const app = express();
6666
let handler = createStaticHandler(routes);
6767

6868
app.get("*", async (req, res) => {
69-
let fetchRequest = createFetchRequest(req);
69+
let fetchRequest = createFetchRequest(req, res);
7070
let context = await handler.query(fetchRequest);
7171

7272
// We'll tackle rendering next...
@@ -81,13 +81,13 @@ const listener = app.listen(3000, () => {
8181
Note we have to first convert the incoming Express request into a Fetch request, which is what the static handler methods operate on. The `createFetchRequest` method is specific to an Express request and in this example is extracted from the `@remix-run/express` adapter:
8282

8383
```js filename=request.js
84-
module.exports = function createFetchRequest(req) {
84+
module.exports = function createFetchRequest(req, res) {
8585
let origin = `${req.protocol}://${req.get("host")}`;
8686
// Note: This had to take originalUrl into account for presumably vite's proxying
8787
let url = new URL(req.originalUrl || req.url, origin);
8888

8989
let controller = new AbortController();
90-
req.on("close", () => controller.abort());
90+
res.on("close", () => controller.abort());
9191

9292
let headers = new Headers();
9393

@@ -121,7 +121,7 @@ Once we've loaded our data by executing all of the matched route loaders for the
121121

122122
```js filename=server.jsx lines=[5-16]
123123
app.get("*", async (req, res) => {
124-
let fetchRequest = createFetchRequest(req);
124+
let fetchRequest = createFetchRequest(req, res);
125125
let context = await handler.query(fetchRequest);
126126

127127
let router = createStaticRouter(
@@ -181,7 +181,7 @@ If any loaders redirect, `handler.query` will return the `Response` directly so
181181

182182
```js filename=server.jsx lines=[5-10]
183183
app.get("*", async (req, res) => {
184-
let fetchRequest = createFetchRequest(req);
184+
let fetchRequest = createFetchRequest(req, res);
185185
let context = await handler.query(fetchRequest);
186186

187187
if (

‎docs/hooks/use-navigate.md

+21
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,27 @@ function EditContact() {
9393
}
9494
```
9595

96+
Please note that `relative: "path"` only impacts the resolution of a relative path. It does not change the the "starting" location for that relative path resolution. This resolution is always relative to the current location in the Route hierarchy (i.e., the route `useNavigate` is called in).
97+
98+
If you wish to use path-relative routing against the current URL instead of the route hierarchy, you can do that with the current [`location`][use-location] and the `URL` constructor (note the trailing slash behavior):
99+
100+
```js
101+
// Assume the current URL is https://remix.run/docs/en/main/start/quickstart
102+
let location = useLocation();
103+
104+
// Without trailing slashes
105+
new URL(".", window.origin + location.pathname);
106+
// 'https://remix.run/docs/en/main/start/'
107+
new URL("..", window.origin + location.pathname);
108+
// 'https://remix.run/docs/en/main/'
109+
110+
// With trailing slashes:
111+
new URL(".", window.origin + location.pathname + "/");
112+
// 'https://remix.run/docs/en/main/start/future-flags/'
113+
new URL("..", window.origin + location.pathname + "/");
114+
// 'https://remix.run/docs/en/main/start/'
115+
```
116+
96117
## `options.unstable_flushSync`
97118

98119
The `unstable_flushSync` option tells React Router DOM to wrap the initial state update for this navigation in a [`ReactDOM.flushSync`][flush-sync] call instead of the default [`React.startTransition`][start-transition]. This allows you to perform synchronous DOM actions immediately after the update is flushed to the DOM.

‎docs/route/loader.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ createBrowserRouter([
4747
]);
4848
```
4949

50-
Note that the `:teamId` in the path is parsed as provided as `params.teamId` by the same name.
50+
Note that the `:teamId` in the path is parsed and provided as `params.teamId` by the same name.
5151

5252
## `request`
5353

‎docs/start/faq.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ function User() {
419419
}
420420
```
421421

422-
Instead of rending your component, remix will render the nearest [catch boundary][remix-catchboundary] instead.
422+
Instead of rendering your component, remix will render the nearest [catch boundary][remix-catchboundary] instead.
423423

424424
[remix]: https://remix.run
425425
[remix-catchboundary]: https://remix.run/docs/en/v1/api/conventions#catchboundary

‎examples/ssr-data-router/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async function createServer() {
5454
}
5555

5656
try {
57-
let appHtml = await render(req);
57+
let appHtml = await render(req, res);
5858
let html = template.replace("<!--app-html-->", appHtml);
5959
res.setHeader("Content-Type", "text/html");
6060
return res.status(200).end(html);

‎examples/ssr-data-router/src/entry.server.tsx

+10-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ import {
88
} from "react-router-dom/server";
99
import { routes } from "./App";
1010

11-
export async function render(request: express.Request) {
11+
export async function render(
12+
request: express.Request,
13+
response: express.Response
14+
) {
1215
let { query, dataRoutes } = createStaticHandler(routes);
13-
let remixRequest = createFetchRequest(request);
16+
let remixRequest = createFetchRequest(request, response);
1417
let context = await query(remixRequest);
1518

1619
if (context instanceof Response) {
@@ -29,13 +32,16 @@ export async function render(request: express.Request) {
2932
);
3033
}
3134

32-
export function createFetchRequest(req: express.Request): Request {
35+
export function createFetchRequest(
36+
req: express.Request,
37+
res: express.Response
38+
): Request {
3339
let origin = `${req.protocol}://${req.get("host")}`;
3440
// Note: This had to take originalUrl into account for presumably vite's proxying
3541
let url = new URL(req.originalUrl || req.url, origin);
3642

3743
let controller = new AbortController();
38-
req.on("close", () => controller.abort());
44+
res.on("close", () => controller.abort());
3945

4046
let headers = new Headers();
4147

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

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# `react-router-dom-v5-compat`
22

3+
## 6.22.1
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@6.22.1`
9+
- `react-router-dom@6.22.1`
10+
311
## 6.22.0
412

513
### Minor Changes

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-dom-v5-compat",
3-
"version": "6.22.0",
3+
"version": "6.22.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.22.0"
27+
"react-router": "6.22.1"
2828
},
2929
"peerDependencies": {
3030
"react": ">=16.8",

‎packages/react-router-dom/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# `react-router-dom`
22

3+
## 6.22.1
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@6.22.1`
9+
- `@remix-run/router@1.15.1`
10+
311
## 6.22.0
412

513
### Minor Changes

‎packages/react-router-dom/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-dom",
3-
"version": "6.22.0",
3+
"version": "6.22.1",
44
"description": "Declarative routing for React web applications",
55
"keywords": [
66
"react",
@@ -23,8 +23,8 @@
2323
"module": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
2525
"dependencies": {
26-
"@remix-run/router": "1.15.0",
27-
"react-router": "6.22.0"
26+
"@remix-run/router": "1.15.1",
27+
"react-router": "6.22.1"
2828
},
2929
"devDependencies": {
3030
"react": "^18.2.0",

‎packages/react-router-native/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# `react-router-native`
22

3+
## 6.22.1
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@6.22.1`
9+
310
## 6.22.0
411

512
### Patch Changes

‎packages/react-router-native/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router-native",
3-
"version": "6.22.0",
3+
"version": "6.22.1",
44
"description": "Declarative routing for React Native applications",
55
"keywords": [
66
"react",
@@ -22,7 +22,7 @@
2222
"types": "./dist/index.d.ts",
2323
"dependencies": {
2424
"@ungap/url-search-params": "^0.2.2",
25-
"react-router": "6.22.0"
25+
"react-router": "6.22.1"
2626
},
2727
"devDependencies": {
2828
"react": "^18.2.0",

‎packages/react-router/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# `react-router`
22

3+
## 6.22.1
4+
5+
### Patch Changes
6+
7+
- Fix encoding/decoding issues with pre-encoded dynamic parameter values ([#11199](https://github.com/remix-run/react-router/pull/11199))
8+
- Updated dependencies:
9+
- `@remix-run/router@1.15.1`
10+
311
## 6.22.0
412

513
### Patch Changes

‎packages/react-router/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-router",
3-
"version": "6.22.0",
3+
"version": "6.22.1",
44
"description": "Declarative routing for React",
55
"keywords": [
66
"react",
@@ -23,7 +23,7 @@
2323
"module": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
2525
"dependencies": {
26-
"@remix-run/router": "1.15.0"
26+
"@remix-run/router": "1.15.1"
2727
},
2828
"devDependencies": {
2929
"react": "^18.2.0"

‎packages/router/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# `@remix-run/router`
22

3+
## 1.15.1
4+
5+
### Patch Changes
6+
7+
- Fix encoding/decoding issues with pre-encoded dynamic parameter values ([#11199](https://github.com/remix-run/react-router/pull/11199))
8+
39
## 1.15.0
410

511
### Minor Changes

‎packages/router/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@remix-run/router",
3-
"version": "1.15.0",
3+
"version": "1.15.1",
44
"description": "Nested/Data-driven/Framework-agnostic Routing",
55
"keywords": [
66
"remix",

0 commit comments

Comments
 (0)
Please sign in to comment.