Skip to content

Commit c68a9b3

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

23 files changed

Lines changed: 185 additions & 12 deletions

File tree

.changeset/pre.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,16 @@
3535
"@playground/split-route-modules-spa": "0.0.0",
3636
"@playground/vite-plugin-cloudflare": "0.0.0"
3737
},
38-
"changesets": []
38+
"changesets": [
39+
"cold-schools-relate",
40+
"fix-createRoutesStub-component-type",
41+
"fix-dev-socket-file-crash",
42+
"gentle-doors-visit",
43+
"kind-shirts-turn",
44+
"passthrough-reqeusts",
45+
"remove-agnostic-types",
46+
"sweet-houses-kick",
47+
"twelve-snails-wait",
48+
"unstable-url"
49+
]
3950
}

packages/create-react-router/CHANGELOG.md

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

3+
## 7.13.2-pre.0
4+
5+
### Patch Changes
6+
7+
- chore: replace chalk with picocolors ([#14837](https://github.com/remix-run/react-router/pull/14837))
8+
39
## 7.13.1
410

511
## 7.13.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.13.1",
3+
"version": "7.13.2-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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# `@react-router/architect`
22

3+
## 7.13.2-pre.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@7.13.2-pre.0`
9+
- `@react-router/node@7.13.2-pre.0`
10+
311
## 7.13.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.13.1",
3+
"version": "7.13.2-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.13.2-pre.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@7.13.2-pre.0`
9+
310
## 7.13.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.13.1",
3+
"version": "7.13.2-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: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,54 @@
11
# `@react-router/dev`
22

3+
## 7.13.2-pre.0
4+
5+
### Patch Changes
6+
7+
- Fix `react-router dev` crash when Unix socket files exist in the project root ([#14854](https://github.com/remix-run/react-router/pull/14854))
8+
- Escape redirect locations in prerendered redirect HTML ([#14880](https://github.com/remix-run/react-router/pull/14880))
9+
- Add `future.unstable_passThroughRequests` flag ([#14775](https://github.com/remix-run/react-router/pull/14775))
10+
11+
By default, React Router normalizes the `request.url` passed to your `loader`, `action`, and `middleware` functions by removing React Router's internal implementation details (`.data` suffixes, `index` + `_routes` query params).
12+
13+
Enabling this flag removes that normalization and passes the raw HTTP `request` instance to your handlers. This provides a few benefits:
14+
- Reduces server-side overhead by eliminating multiple `new Request()` calls on the critical path
15+
- Allows you to distinguish document from data requests in your handlers base don the presence of a `.data` suffix (useful for observability purposes)
16+
17+
If you were previously relying on the normalization of `request.url`, you can switch to use the new sibling `unstable_url` parameter which contains a `URL` instance representing the normalized location:
18+
19+
```tsx
20+
// ❌ Before: you could assume there was no `.data` suffix in `request.url`
21+
export async function loader({ request }: Route.LoaderArgs) {
22+
let url = new URL(request.url);
23+
if (url.pathname === "/path") {
24+
// This check will fail with the flag enabled because the `.data` suffix will
25+
// exist on data requests
26+
}
27+
}
28+
29+
// ✅ After: use `unstable_url` for normalized routing logic and `request.url`
30+
// for raw routing logic
31+
export async function loader({ request, unstable_url }: Route.LoaderArgs) {
32+
if (unstable_url.pathname === "/path") {
33+
// This will always have the `.data` suffix stripped
34+
}
35+
36+
// And now you can distinguish between document versus data requests
37+
let isDataRequest = new URL(request.url).pathname.endsWith(".data");
38+
}
39+
```
40+
41+
- Add a new `unstable_url: URL` parameter to route handler methods (`loader`, `action`, `middleware`, etc.) representing the normalized URL the application is navigating to or fetching, with React Router implementation details removed (`.data`suffix, `index`/`_routes` query params) ([#14775](https://github.com/remix-run/react-router/pull/14775))
42+
43+
This is being added alongside the new `future.unstable_passthroughRequests` future flag so that users still have a way to access the normalized URL when that flag is enabled and non-normalized `request`'s are being passed to your handlers. When adopting this flag, you will only need to start leveraging this new parameter if you are relying on the normalization of `request.url` in your application code.
44+
45+
If you don't have the flag enabled, then `unstable_url` will match `request.url`.
46+
47+
- Updated dependencies:
48+
- `react-router@7.13.2-pre.0`
49+
- `@react-router/node@7.13.2-pre.0`
50+
- `@react-router/serve@7.13.2-pre.0`
51+
352
## 7.13.1
453

554
### Patch 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.13.1",
3+
"version": "7.13.2-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.13.2-pre.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies:
8+
- `react-router@7.13.2-pre.0`
9+
310
## 7.13.1
411

512
### Patch Changes

0 commit comments

Comments
 (0)