@react-router/dev 7.13.2-pre.0 → 7.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -11
- package/dist/cli/index.js +1 -1
- package/dist/config.js +1 -1
- package/dist/routes.js +1 -1
- package/dist/vite/cloudflare.js +1 -1
- package/dist/vite.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
-
## 7.13.2
|
|
3
|
+
## 7.13.2
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
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
|
+
|
|
8
9
|
- Escape redirect locations in prerendered redirect HTML ([#14880](https://github.com/remix-run/react-router/pull/14880))
|
|
10
|
+
|
|
9
11
|
- Add `future.unstable_passThroughRequests` flag ([#14775](https://github.com/remix-run/react-router/pull/14775))
|
|
10
12
|
|
|
11
13
|
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
14
|
|
|
13
15
|
Enabling this flag removes that normalization and passes the raw HTTP `request` instance to your handlers. This provides a few benefits:
|
|
16
|
+
|
|
14
17
|
- Reduces server-side overhead by eliminating multiple `new Request()` calls on the critical path
|
|
15
18
|
- Allows you to distinguish document from data requests in your handlers base don the presence of a `.data` suffix (useful for observability purposes)
|
|
16
19
|
|
|
@@ -45,9 +48,9 @@
|
|
|
45
48
|
If you don't have the flag enabled, then `unstable_url` will match `request.url`.
|
|
46
49
|
|
|
47
50
|
- Updated dependencies:
|
|
48
|
-
- `react-router@7.13.2
|
|
49
|
-
- `@react-router/node@7.13.2
|
|
50
|
-
- `@react-router/serve@7.13.2
|
|
51
|
+
- `react-router@7.13.2`
|
|
52
|
+
- `@react-router/node@7.13.2`
|
|
53
|
+
- `@react-router/serve@7.13.2`
|
|
51
54
|
|
|
52
55
|
## 7.13.1
|
|
53
56
|
|
|
@@ -86,25 +89,25 @@
|
|
|
86
89
|
|
|
87
90
|
| URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** |
|
|
88
91
|
| ------------ | ----------------- | ------------------------ |
|
|
89
|
-
| **Document** | `/a/b/c` | `/a/b/c` ✅
|
|
90
|
-
| **Data** | `/a/b/c.data` | `/a/b/c` ✅
|
|
92
|
+
| **Document** | `/a/b/c` | `/a/b/c` ✅ |
|
|
93
|
+
| **Data** | `/a/b/c.data` | `/a/b/c` ✅ |
|
|
91
94
|
|
|
92
95
|
| URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** |
|
|
93
96
|
| ------------- | ----------------- | ------------------------ |
|
|
94
|
-
| **Document** | `/a/b/c/` | `/a/b/c/` ✅
|
|
97
|
+
| **Document** | `/a/b/c/` | `/a/b/c/` ✅ |
|
|
95
98
|
| **Data** | `/a/b/c.data` | `/a/b/c` ⚠️ |
|
|
96
99
|
|
|
97
100
|
With this flag enabled, these pathnames will be made consistent though a new `_.data` format for client-side `.data` requests:
|
|
98
101
|
|
|
99
102
|
| URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** |
|
|
100
103
|
| ------------ | ----------------- | ------------------------ |
|
|
101
|
-
| **Document** | `/a/b/c` | `/a/b/c` ✅
|
|
102
|
-
| **Data** | `/a/b/c.data` | `/a/b/c` ✅
|
|
104
|
+
| **Document** | `/a/b/c` | `/a/b/c` ✅ |
|
|
105
|
+
| **Data** | `/a/b/c.data` | `/a/b/c` ✅ |
|
|
103
106
|
|
|
104
107
|
| URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** |
|
|
105
108
|
| ------------- | ------------------ | ------------------------ |
|
|
106
|
-
| **Document** | `/a/b/c/` | `/a/b/c/` ✅
|
|
107
|
-
| **Data** | `/a/b/c/_.data` ⬅️ | `/a/b/c/` ✅
|
|
109
|
+
| **Document** | `/a/b/c/` | `/a/b/c/` ✅ |
|
|
110
|
+
| **Data** | `/a/b/c/_.data` ⬅️ | `/a/b/c/` ✅ |
|
|
108
111
|
|
|
109
112
|
This a bug fix but we are putting it behind an opt-in flag because it has the potential to be a "breaking bug fix" if you are relying on the URL format for any other application or caching logic.
|
|
110
113
|
|
|
@@ -362,6 +365,7 @@
|
|
|
362
365
|
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
|
|
363
366
|
|
|
364
367
|
We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
|
|
368
|
+
|
|
365
369
|
- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
|
|
366
370
|
- [`createContext`](https://reactrouter.com/api/utils/createContext)
|
|
367
371
|
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
|
|
@@ -1104,6 +1108,7 @@
|
|
|
1104
1108
|
```
|
|
1105
1109
|
|
|
1106
1110
|
This initial implementation targets type inference for:
|
|
1111
|
+
|
|
1107
1112
|
- `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
|
|
1108
1113
|
- `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
|
|
1109
1114
|
- `ActionData` : Action data from `action` and/or `clientAction` within your route module
|
|
@@ -1118,6 +1123,7 @@
|
|
|
1118
1123
|
```
|
|
1119
1124
|
|
|
1120
1125
|
Check out our docs for more:
|
|
1126
|
+
|
|
1121
1127
|
- [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
|
|
1122
1128
|
- [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
|
|
1123
1129
|
|
|
@@ -1317,6 +1323,7 @@
|
|
|
1317
1323
|
- Vite: Provide `Unstable_ServerBundlesFunction` and `Unstable_VitePluginConfig` types ([#8654](https://github.com/remix-run/remix/pull/8654))
|
|
1318
1324
|
|
|
1319
1325
|
- Vite: add `--sourcemapClient` and `--sourcemapServer` flags to `remix vite:build` ([#8613](https://github.com/remix-run/remix/pull/8613))
|
|
1326
|
+
|
|
1320
1327
|
- `--sourcemapClient`
|
|
1321
1328
|
|
|
1322
1329
|
- `--sourcemapClient=inline`
|
|
@@ -1653,6 +1660,7 @@
|
|
|
1653
1660
|
- Add support for `clientLoader`/`clientAction`/`HydrateFallback` route exports ([RFC](https://github.com/remix-run/remix/discussions/7634)) ([#8173](https://github.com/remix-run/remix/pull/8173))
|
|
1654
1661
|
|
|
1655
1662
|
Remix now supports loaders/actions that run on the client (in addition to, or instead of the loader/action that runs on the server). While we still recommend server loaders/actions for the majority of your data needs in a Remix app - these provide some levers you can pull for more advanced use-cases such as:
|
|
1663
|
+
|
|
1656
1664
|
- Leveraging a data source local to the browser (i.e., `localStorage`)
|
|
1657
1665
|
- Managing a client-side cache of server data (like `IndexedDB`)
|
|
1658
1666
|
- Bypassing the Remix server in a BFF setup and hitting your API directly from the browser
|
|
@@ -2056,6 +2064,7 @@
|
|
|
2056
2064
|
- Output esbuild metafiles for bundle analysis ([#6772](https://github.com/remix-run/remix/pull/6772))
|
|
2057
2065
|
|
|
2058
2066
|
Written to server build directory (`build/` by default):
|
|
2067
|
+
|
|
2059
2068
|
- `metafile.css.json`
|
|
2060
2069
|
- `metafile.js.json` (browser JS)
|
|
2061
2070
|
- `metafile.server.json` (server JS)
|
|
@@ -2153,6 +2162,7 @@
|
|
|
2153
2162
|
- built-in tls support ([#6483](https://github.com/remix-run/remix/pull/6483))
|
|
2154
2163
|
|
|
2155
2164
|
New options:
|
|
2165
|
+
|
|
2156
2166
|
- `--tls-key` / `tlsKey`: TLS key
|
|
2157
2167
|
- `--tls-cert` / `tlsCert`: TLS Certificate
|
|
2158
2168
|
|
|
@@ -2423,6 +2433,7 @@
|
|
|
2423
2433
|
```
|
|
2424
2434
|
|
|
2425
2435
|
The dev server will:
|
|
2436
|
+
|
|
2426
2437
|
- force `NODE_ENV=development` and warn you if it was previously set to something else
|
|
2427
2438
|
- rebuild your app whenever your Remix app code changes
|
|
2428
2439
|
- restart your app server whenever rebuilds succeed
|
package/dist/cli/index.js
CHANGED
package/dist/config.js
CHANGED
package/dist/routes.js
CHANGED
package/dist/vite/cloudflare.js
CHANGED
package/dist/vite.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-router/dev",
|
|
3
|
-
"version": "7.13.2
|
|
3
|
+
"version": "7.13.2",
|
|
4
4
|
"description": "Dev tools and CLI for React Router",
|
|
5
5
|
"homepage": "https://reactrouter.com",
|
|
6
6
|
"bugs": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"tinyglobby": "^0.2.14",
|
|
93
93
|
"valibot": "^1.2.0",
|
|
94
94
|
"vite-node": "^3.2.2",
|
|
95
|
-
"@react-router/node": "7.13.2
|
|
95
|
+
"@react-router/node": "7.13.2"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@types/babel__core": "^7.20.5",
|
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
"vite": "^6.3.0",
|
|
117
117
|
"wireit": "0.14.9",
|
|
118
118
|
"wrangler": "^4.23.0",
|
|
119
|
-
"@react-router/serve": "7.13.2
|
|
120
|
-
"react-router": "^7.13.2
|
|
119
|
+
"@react-router/serve": "7.13.2",
|
|
120
|
+
"react-router": "^7.13.2"
|
|
121
121
|
},
|
|
122
122
|
"peerDependencies": {
|
|
123
123
|
"@vitejs/plugin-rsc": "~0.5.7",
|
|
@@ -125,8 +125,8 @@
|
|
|
125
125
|
"typescript": "^5.1.0",
|
|
126
126
|
"vite": "^5.1.0 || ^6.0.0 || ^7.0.0",
|
|
127
127
|
"wrangler": "^3.28.2 || ^4.0.0",
|
|
128
|
-
"@react-router/serve": "^7.13.2
|
|
129
|
-
"react-router": "^7.13.2
|
|
128
|
+
"@react-router/serve": "^7.13.2",
|
|
129
|
+
"react-router": "^7.13.2"
|
|
130
130
|
},
|
|
131
131
|
"peerDependenciesMeta": {
|
|
132
132
|
"@vitejs/plugin-rsc": {
|