@react-router/dev 7.9.5 → 7.9.6-pre.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 +11 -8
- package/dist/cli/index.js +2 -3
- package/dist/config/defaults/entry.server.node.tsx +8 -0
- package/dist/config.js +1 -1
- package/dist/routes.js +1 -1
- package/dist/vite/cloudflare.js +1 -1
- package/dist/vite.js +3 -3
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# `@react-router/dev`
|
|
2
2
|
|
|
3
|
+
## 7.9.6-pre.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Use a dynamic `import()` to load ESM-only `p-map` dependency to avoid issues on Node 20.18 and below ([#14492](https://github.com/remix-run/react-router/pull/14492))
|
|
8
|
+
- Short circuit `HEAD` document requests before calling `renderToPipeableStream` in the default `entry.server.tsx` to more closely align with the [spec](https://httpwg.org/specs/rfc9110.html#HEAD) ([#14488](https://github.com/remix-run/react-router/pull/14488))
|
|
9
|
+
- Updated dependencies:
|
|
10
|
+
- `react-router@7.9.6-pre.0`
|
|
11
|
+
- `@react-router/node@7.9.6-pre.0`
|
|
12
|
+
- `@react-router/serve@7.9.6-pre.0`
|
|
13
|
+
|
|
3
14
|
## 7.9.5
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -169,7 +180,6 @@
|
|
|
169
180
|
- Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
|
|
170
181
|
|
|
171
182
|
We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
|
|
172
|
-
|
|
173
183
|
- [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
|
|
174
184
|
- [`createContext`](https://reactrouter.com/api/utils/createContext)
|
|
175
185
|
- `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
|
|
@@ -912,7 +922,6 @@
|
|
|
912
922
|
```
|
|
913
923
|
|
|
914
924
|
This initial implementation targets type inference for:
|
|
915
|
-
|
|
916
925
|
- `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
|
|
917
926
|
- `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
|
|
918
927
|
- `ActionData` : Action data from `action` and/or `clientAction` within your route module
|
|
@@ -927,7 +936,6 @@
|
|
|
927
936
|
```
|
|
928
937
|
|
|
929
938
|
Check out our docs for more:
|
|
930
|
-
|
|
931
939
|
- [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
|
|
932
940
|
- [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
|
|
933
941
|
|
|
@@ -1127,7 +1135,6 @@
|
|
|
1127
1135
|
- Vite: Provide `Unstable_ServerBundlesFunction` and `Unstable_VitePluginConfig` types ([#8654](https://github.com/remix-run/remix/pull/8654))
|
|
1128
1136
|
|
|
1129
1137
|
- Vite: add `--sourcemapClient` and `--sourcemapServer` flags to `remix vite:build` ([#8613](https://github.com/remix-run/remix/pull/8613))
|
|
1130
|
-
|
|
1131
1138
|
- `--sourcemapClient`
|
|
1132
1139
|
|
|
1133
1140
|
- `--sourcemapClient=inline`
|
|
@@ -1464,7 +1471,6 @@
|
|
|
1464
1471
|
- 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))
|
|
1465
1472
|
|
|
1466
1473
|
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:
|
|
1467
|
-
|
|
1468
1474
|
- Leveraging a data source local to the browser (i.e., `localStorage`)
|
|
1469
1475
|
- Managing a client-side cache of server data (like `IndexedDB`)
|
|
1470
1476
|
- Bypassing the Remix server in a BFF setup and hitting your API directly from the browser
|
|
@@ -1868,7 +1874,6 @@
|
|
|
1868
1874
|
- Output esbuild metafiles for bundle analysis ([#6772](https://github.com/remix-run/remix/pull/6772))
|
|
1869
1875
|
|
|
1870
1876
|
Written to server build directory (`build/` by default):
|
|
1871
|
-
|
|
1872
1877
|
- `metafile.css.json`
|
|
1873
1878
|
- `metafile.js.json` (browser JS)
|
|
1874
1879
|
- `metafile.server.json` (server JS)
|
|
@@ -1966,7 +1971,6 @@
|
|
|
1966
1971
|
- built-in tls support ([#6483](https://github.com/remix-run/remix/pull/6483))
|
|
1967
1972
|
|
|
1968
1973
|
New options:
|
|
1969
|
-
|
|
1970
1974
|
- `--tls-key` / `tlsKey`: TLS key
|
|
1971
1975
|
- `--tls-cert` / `tlsCert`: TLS Certificate
|
|
1972
1976
|
|
|
@@ -2237,7 +2241,6 @@
|
|
|
2237
2241
|
```
|
|
2238
2242
|
|
|
2239
2243
|
The dev server will:
|
|
2240
|
-
|
|
2241
2244
|
- force `NODE_ENV=development` and warn you if it was previously set to something else
|
|
2242
2245
|
- rebuild your app whenever your Remix app code changes
|
|
2243
2246
|
- restart your app server whenever rebuilds succeed
|
package/dist/cli/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* @react-router/dev v7.9.
|
|
3
|
+
* @react-router/dev v7.9.6-pre.0
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) Remix Software Inc.
|
|
6
6
|
*
|
|
@@ -1780,7 +1780,7 @@ function resolveEnvironmentsOptions(environmentResolvers, resolverOptions) {
|
|
|
1780
1780
|
function isNonNullable(x) {
|
|
1781
1781
|
return x != null;
|
|
1782
1782
|
}
|
|
1783
|
-
var import_node_crypto, import_node_fs3, import_promises2, path7, url, babel2, import_node_fetch_server2, import_react_router2, import_es_module_lexer, import_pick3, import_jsesc, import_picocolors5, import_kebabCase,
|
|
1783
|
+
var import_node_crypto, import_node_fs3, import_promises2, path7, url, babel2, import_node_fetch_server2, import_react_router2, import_es_module_lexer, import_pick3, import_jsesc, import_picocolors5, import_kebabCase, CLIENT_NON_COMPONENT_EXPORTS, CLIENT_ROUTE_EXPORTS, BUILD_CLIENT_ROUTE_QUERY_STRING, SSR_BUNDLE_PREFIX, virtualHmrRuntime, virtualInjectHmrRuntime, virtual, getServerBuildDirectory, getClientBuildDirectory, defaultEntriesDir, defaultEntries, REACT_REFRESH_HEADER;
|
|
1784
1784
|
var init_plugin = __esm({
|
|
1785
1785
|
"vite/plugin.ts"() {
|
|
1786
1786
|
"use strict";
|
|
@@ -1797,7 +1797,6 @@ var init_plugin = __esm({
|
|
|
1797
1797
|
import_jsesc = __toESM(require("jsesc"));
|
|
1798
1798
|
import_picocolors5 = __toESM(require("picocolors"));
|
|
1799
1799
|
import_kebabCase = __toESM(require("lodash/kebabCase"));
|
|
1800
|
-
import_p_map = __toESM(require("p-map"));
|
|
1801
1800
|
init_typegen();
|
|
1802
1801
|
init_invariant();
|
|
1803
1802
|
init_babel();
|
|
@@ -18,6 +18,14 @@ export default function handleRequest(
|
|
|
18
18
|
// If you have middleware enabled:
|
|
19
19
|
// loadContext: RouterContextProvider
|
|
20
20
|
) {
|
|
21
|
+
// https://httpwg.org/specs/rfc9110.html#HEAD
|
|
22
|
+
if (request.method.toUpperCase() === "HEAD") {
|
|
23
|
+
return new Response(null, {
|
|
24
|
+
status: responseStatusCode,
|
|
25
|
+
headers: responseHeaders,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
|
|
21
29
|
return new Promise((resolve, reject) => {
|
|
22
30
|
let shellRendered = false;
|
|
23
31
|
let userAgent = request.headers.get("user-agent");
|
package/dist/config.js
CHANGED
package/dist/routes.js
CHANGED
package/dist/vite/cloudflare.js
CHANGED
package/dist/vite.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @react-router/dev v7.9.
|
|
2
|
+
* @react-router/dev v7.9.6-pre.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -59,7 +59,6 @@ var import_pick3 = __toESM(require("lodash/pick"));
|
|
|
59
59
|
var import_jsesc = __toESM(require("jsesc"));
|
|
60
60
|
var import_picocolors4 = __toESM(require("picocolors"));
|
|
61
61
|
var import_kebabCase = __toESM(require("lodash/kebabCase"));
|
|
62
|
-
var import_p_map = __toESM(require("p-map"));
|
|
63
62
|
|
|
64
63
|
// typegen/index.ts
|
|
65
64
|
var import_promises = __toESM(require("fs/promises"));
|
|
@@ -4322,7 +4321,8 @@ async function handlePrerender(viteConfig, reactRouterConfig, serverBuildDirecto
|
|
|
4322
4321
|
if (typeof prerender === "object" && "unstable_concurrency" in prerender) {
|
|
4323
4322
|
concurrency = prerender.unstable_concurrency ?? 1;
|
|
4324
4323
|
}
|
|
4325
|
-
|
|
4324
|
+
const pMap = await import("p-map");
|
|
4325
|
+
await pMap.default(build.prerender, prerenderSinglePath, { concurrency });
|
|
4326
4326
|
}
|
|
4327
4327
|
function getStaticPrerenderPaths(routes) {
|
|
4328
4328
|
let paths = ["/"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-router/dev",
|
|
3
|
-
"version": "7.9.
|
|
3
|
+
"version": "7.9.6-pre.0",
|
|
4
4
|
"description": "Dev tools and CLI for React Router",
|
|
5
5
|
"homepage": "https://reactrouter.com",
|
|
6
6
|
"bugs": {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"tinyglobby": "^0.2.14",
|
|
88
88
|
"valibot": "^1.1.0",
|
|
89
89
|
"vite-node": "^3.2.2",
|
|
90
|
-
"@react-router/node": "7.9.
|
|
90
|
+
"@react-router/node": "7.9.6-pre.0"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@types/babel__core": "^7.20.5",
|
|
@@ -110,16 +110,16 @@
|
|
|
110
110
|
"vite": "^6.1.0",
|
|
111
111
|
"wireit": "0.14.9",
|
|
112
112
|
"wrangler": "^4.23.0",
|
|
113
|
-
"@react-router/serve": "7.9.
|
|
114
|
-
"react-router": "^7.9.
|
|
113
|
+
"@react-router/serve": "7.9.6-pre.0",
|
|
114
|
+
"react-router": "^7.9.6-pre.0"
|
|
115
115
|
},
|
|
116
116
|
"peerDependencies": {
|
|
117
117
|
"@vitejs/plugin-rsc": "*",
|
|
118
118
|
"typescript": "^5.1.0",
|
|
119
119
|
"vite": "^5.1.0 || ^6.0.0 || ^7.0.0",
|
|
120
120
|
"wrangler": "^3.28.2 || ^4.0.0",
|
|
121
|
-
"@react-router/serve": "^7.9.
|
|
122
|
-
"react-router": "^7.9.
|
|
121
|
+
"@react-router/serve": "^7.9.6-pre.0",
|
|
122
|
+
"react-router": "^7.9.6-pre.0"
|
|
123
123
|
},
|
|
124
124
|
"peerDependenciesMeta": {
|
|
125
125
|
"@vitejs/plugin-rsc": {
|