@react-router/dev 7.12.0-pre.0 → 7.12.0
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 +31 -21
- 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,6 +1,6 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
-
## 7.12.0
|
|
3
|
+
## 7.12.0
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
@@ -9,41 +9,43 @@
|
|
|
9
9
|
### Patch Changes
|
|
10
10
|
|
|
11
11
|
- Fix `Maximum call stack size exceeded` errors when HMR is triggered against code with cyclic imports ([#14522](https://github.com/remix-run/react-router/pull/14522))
|
|
12
|
+
|
|
12
13
|
- fix(vite): Skip SSR middleware in preview server for SPA mode ([#14673](https://github.com/remix-run/react-router/pull/14673))
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
- \[UNSTABLE] Add a new `future.unstable_trailingSlashAwareDataRequests` flag to provide consistent behavior of `request.pathname` inside `middleware`, `loader`, and `action` functions on document and data requests when a trailing slash is present in the browser URL. ([#14644](https://github.com/remix-run/react-router/pull/14644))
|
|
14
16
|
|
|
15
17
|
Currently, your HTTP and `request` pathnames would be as follows for `/a/b/c` and `/a/b/c/`
|
|
16
18
|
|
|
17
|
-
| URL `/a/b/c` | **HTTP pathname** | **`request` pathname
|
|
18
|
-
| ------------ | ----------------- |
|
|
19
|
-
| **Document** | `/a/b/c` | `/a/b/c` ✅
|
|
20
|
-
| **Data** | `/a/b/c.data` | `/a/b/c` ✅
|
|
19
|
+
| URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** |
|
|
20
|
+
| ------------ | ----------------- | ------------------------ |
|
|
21
|
+
| **Document** | `/a/b/c` | `/a/b/c` ✅ |
|
|
22
|
+
| **Data** | `/a/b/c.data` | `/a/b/c` ✅ |
|
|
21
23
|
|
|
22
|
-
| URL `/a/b/c/` | **HTTP pathname** | **`request` pathname
|
|
23
|
-
| ------------- | ----------------- |
|
|
24
|
-
| **Document** | `/a/b/c/` | `/a/b/c/` ✅
|
|
25
|
-
| **Data** | `/a/b/c.data` | `/a/b/c` ⚠️
|
|
24
|
+
| URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** |
|
|
25
|
+
| ------------- | ----------------- | ------------------------ |
|
|
26
|
+
| **Document** | `/a/b/c/` | `/a/b/c/` ✅ |
|
|
27
|
+
| **Data** | `/a/b/c.data` | `/a/b/c` ⚠️ |
|
|
26
28
|
|
|
27
29
|
With this flag enabled, these pathnames will be made consistent though a new `_.data` format for client-side `.data` requests:
|
|
28
30
|
|
|
29
|
-
| URL `/a/b/c` | **HTTP pathname** | **`request` pathname
|
|
30
|
-
| ------------ | ----------------- |
|
|
31
|
-
| **Document** | `/a/b/c` | `/a/b/c` ✅
|
|
32
|
-
| **Data** | `/a/b/c.data` | `/a/b/c` ✅
|
|
31
|
+
| URL `/a/b/c` | **HTTP pathname** | **`request` pathname\`** |
|
|
32
|
+
| ------------ | ----------------- | ------------------------ |
|
|
33
|
+
| **Document** | `/a/b/c` | `/a/b/c` ✅ |
|
|
34
|
+
| **Data** | `/a/b/c.data` | `/a/b/c` ✅ |
|
|
33
35
|
|
|
34
|
-
| URL `/a/b/c/` | **HTTP pathname** | **`request` pathname
|
|
35
|
-
| ------------- | ------------------ |
|
|
36
|
-
| **Document** | `/a/b/c/` | `/a/b/c/` ✅
|
|
37
|
-
| **Data** | `/a/b/c/_.data` ⬅️ | `/a/b/c/` ✅
|
|
36
|
+
| URL `/a/b/c/` | **HTTP pathname** | **`request` pathname\`** |
|
|
37
|
+
| ------------- | ------------------ | ------------------------ |
|
|
38
|
+
| **Document** | `/a/b/c/` | `/a/b/c/` ✅ |
|
|
39
|
+
| **Data** | `/a/b/c/_.data` ⬅️ | `/a/b/c/` ✅ |
|
|
38
40
|
|
|
39
41
|
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.
|
|
40
42
|
|
|
41
43
|
Enabling this flag also changes the format of client side `.data` requests from `/_root.data` to `/_.data` when navigating to `/` to align with the new format. This does not impact the `request` pathname which is still `/` in all cases.
|
|
42
44
|
|
|
43
45
|
- Updated dependencies:
|
|
44
|
-
- `react-router@7.12.0
|
|
45
|
-
- `@react-router/node@7.12.0
|
|
46
|
-
- `@react-router/serve@7.12.0
|
|
46
|
+
- `react-router@7.12.0`
|
|
47
|
+
- `@react-router/node@7.12.0`
|
|
48
|
+
- `@react-router/serve@7.12.0`
|
|
47
49
|
|
|
48
50
|
## 7.11.0
|
|
49
51
|
|
|
@@ -292,6 +294,7 @@
|
|
|
292
294
|
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
|
|
293
295
|
|
|
294
296
|
We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
|
|
297
|
+
|
|
295
298
|
- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
|
|
296
299
|
- [`createContext`](https://reactrouter.com/api/utils/createContext)
|
|
297
300
|
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
|
|
@@ -1034,6 +1037,7 @@
|
|
|
1034
1037
|
```
|
|
1035
1038
|
|
|
1036
1039
|
This initial implementation targets type inference for:
|
|
1040
|
+
|
|
1037
1041
|
- `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
|
|
1038
1042
|
- `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
|
|
1039
1043
|
- `ActionData` : Action data from `action` and/or `clientAction` within your route module
|
|
@@ -1048,6 +1052,7 @@
|
|
|
1048
1052
|
```
|
|
1049
1053
|
|
|
1050
1054
|
Check out our docs for more:
|
|
1055
|
+
|
|
1051
1056
|
- [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
|
|
1052
1057
|
- [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
|
|
1053
1058
|
|
|
@@ -1247,6 +1252,7 @@
|
|
|
1247
1252
|
- Vite: Provide `Unstable_ServerBundlesFunction` and `Unstable_VitePluginConfig` types ([#8654](https://github.com/remix-run/remix/pull/8654))
|
|
1248
1253
|
|
|
1249
1254
|
- Vite: add `--sourcemapClient` and `--sourcemapServer` flags to `remix vite:build` ([#8613](https://github.com/remix-run/remix/pull/8613))
|
|
1255
|
+
|
|
1250
1256
|
- `--sourcemapClient`
|
|
1251
1257
|
|
|
1252
1258
|
- `--sourcemapClient=inline`
|
|
@@ -1583,6 +1589,7 @@
|
|
|
1583
1589
|
- 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))
|
|
1584
1590
|
|
|
1585
1591
|
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:
|
|
1592
|
+
|
|
1586
1593
|
- Leveraging a data source local to the browser (i.e., `localStorage`)
|
|
1587
1594
|
- Managing a client-side cache of server data (like `IndexedDB`)
|
|
1588
1595
|
- Bypassing the Remix server in a BFF setup and hitting your API directly from the browser
|
|
@@ -1986,6 +1993,7 @@
|
|
|
1986
1993
|
- Output esbuild metafiles for bundle analysis ([#6772](https://github.com/remix-run/remix/pull/6772))
|
|
1987
1994
|
|
|
1988
1995
|
Written to server build directory (`build/` by default):
|
|
1996
|
+
|
|
1989
1997
|
- `metafile.css.json`
|
|
1990
1998
|
- `metafile.js.json` (browser JS)
|
|
1991
1999
|
- `metafile.server.json` (server JS)
|
|
@@ -2083,6 +2091,7 @@
|
|
|
2083
2091
|
- built-in tls support ([#6483](https://github.com/remix-run/remix/pull/6483))
|
|
2084
2092
|
|
|
2085
2093
|
New options:
|
|
2094
|
+
|
|
2086
2095
|
- `--tls-key` / `tlsKey`: TLS key
|
|
2087
2096
|
- `--tls-cert` / `tlsCert`: TLS Certificate
|
|
2088
2097
|
|
|
@@ -2353,6 +2362,7 @@
|
|
|
2353
2362
|
```
|
|
2354
2363
|
|
|
2355
2364
|
The dev server will:
|
|
2365
|
+
|
|
2356
2366
|
- force `NODE_ENV=development` and warn you if it was previously set to something else
|
|
2357
2367
|
- rebuild your app whenever your Remix app code changes
|
|
2358
2368
|
- 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.12.0
|
|
3
|
+
"version": "7.12.0",
|
|
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.12.0
|
|
95
|
+
"@react-router/node": "7.12.0"
|
|
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.12.0
|
|
120
|
-
"react-router": "^7.12.0
|
|
119
|
+
"@react-router/serve": "7.12.0",
|
|
120
|
+
"react-router": "^7.12.0"
|
|
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.12.0
|
|
129
|
-
"react-router": "^7.12.0
|
|
128
|
+
"@react-router/serve": "^7.12.0",
|
|
129
|
+
"react-router": "^7.12.0"
|
|
130
130
|
},
|
|
131
131
|
"peerDependenciesMeta": {
|
|
132
132
|
"@vitejs/plugin-rsc": {
|