@react-router/dev 7.9.5 → 7.9.6-pre.1

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 CHANGED
@@ -1,5 +1,25 @@
1
1
  # `@react-router/dev`
2
2
 
3
+ ## 7.9.6-pre.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies:
8
+ - `react-router@7.9.6-pre.1`
9
+ - `@react-router/node@7.9.6-pre.1`
10
+ - `@react-router/serve@7.9.6-pre.1`
11
+
12
+ ## 7.9.6-pre.0
13
+
14
+ ### Patch Changes
15
+
16
+ - 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))
17
+ - 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))
18
+ - Updated dependencies:
19
+ - `react-router@7.9.6-pre.0`
20
+ - `@react-router/node@7.9.6-pre.0`
21
+ - `@react-router/serve@7.9.6-pre.0`
22
+
3
23
  ## 7.9.5
4
24
 
5
25
  ### Patch Changes
@@ -169,7 +189,6 @@
169
189
  - Stabilize middleware and context APIs. ([#14215](https://github.com/remix-run/react-router/pull/14215))
170
190
 
171
191
  We have removed the `unstable_` prefix from the following APIs and they are now considered stable and ready for production use:
172
-
173
192
  - [`RouterContextProvider`](https://reactrouter.com/api/utils/RouterContextProvider)
174
193
  - [`createContext`](https://reactrouter.com/api/utils/createContext)
175
194
  - `createBrowserRouter` [`getContext`](https://reactrouter.com/api/data-routers/createBrowserRouter#optsgetcontext) option
@@ -912,7 +931,6 @@
912
931
  ```
913
932
 
914
933
  This initial implementation targets type inference for:
915
-
916
934
  - `Params` : Path parameters from your routing config in `routes.ts` including file-based routing
917
935
  - `LoaderData` : Loader data from `loader` and/or `clientLoader` within your route module
918
936
  - `ActionData` : Action data from `action` and/or `clientAction` within your route module
@@ -927,7 +945,6 @@
927
945
  ```
928
946
 
929
947
  Check out our docs for more:
930
-
931
948
  - [_Explanations > Type Safety_](https://reactrouter.com/dev/guides/explanation/type-safety)
932
949
  - [_How-To > Setting up type safety_](https://reactrouter.com/dev/guides/how-to/setting-up-type-safety)
933
950
 
@@ -1127,7 +1144,6 @@
1127
1144
  - Vite: Provide `Unstable_ServerBundlesFunction` and `Unstable_VitePluginConfig` types ([#8654](https://github.com/remix-run/remix/pull/8654))
1128
1145
 
1129
1146
  - Vite: add `--sourcemapClient` and `--sourcemapServer` flags to `remix vite:build` ([#8613](https://github.com/remix-run/remix/pull/8613))
1130
-
1131
1147
  - `--sourcemapClient`
1132
1148
 
1133
1149
  - `--sourcemapClient=inline`
@@ -1464,7 +1480,6 @@
1464
1480
  - 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
1481
 
1466
1482
  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
1483
  - Leveraging a data source local to the browser (i.e., `localStorage`)
1469
1484
  - Managing a client-side cache of server data (like `IndexedDB`)
1470
1485
  - Bypassing the Remix server in a BFF setup and hitting your API directly from the browser
@@ -1868,7 +1883,6 @@
1868
1883
  - Output esbuild metafiles for bundle analysis ([#6772](https://github.com/remix-run/remix/pull/6772))
1869
1884
 
1870
1885
  Written to server build directory (`build/` by default):
1871
-
1872
1886
  - `metafile.css.json`
1873
1887
  - `metafile.js.json` (browser JS)
1874
1888
  - `metafile.server.json` (server JS)
@@ -1966,7 +1980,6 @@
1966
1980
  - built-in tls support ([#6483](https://github.com/remix-run/remix/pull/6483))
1967
1981
 
1968
1982
  New options:
1969
-
1970
1983
  - `--tls-key` / `tlsKey`: TLS key
1971
1984
  - `--tls-cert` / `tlsCert`: TLS Certificate
1972
1985
 
@@ -2237,7 +2250,6 @@
2237
2250
  ```
2238
2251
 
2239
2252
  The dev server will:
2240
-
2241
2253
  - force `NODE_ENV=development` and warn you if it was previously set to something else
2242
2254
  - rebuild your app whenever your Remix app code changes
2243
2255
  - 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.5
3
+ * @react-router/dev v7.9.6-pre.1
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, import_p_map, 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;
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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.9.5
2
+ * @react-router/dev v7.9.6-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/routes.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.9.5
2
+ * @react-router/dev v7.9.6-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.9.5
2
+ * @react-router/dev v7.9.6-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
package/dist/vite.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @react-router/dev v7.9.5
2
+ * @react-router/dev v7.9.6-pre.1
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
- await (0, import_p_map.default)(build.prerender, prerenderSinglePath, { concurrency });
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.5",
3
+ "version": "7.9.6-pre.1",
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.5"
90
+ "@react-router/node": "7.9.6-pre.1"
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.5",
114
- "react-router": "^7.9.5"
113
+ "@react-router/serve": "7.9.6-pre.1",
114
+ "react-router": "^7.9.6-pre.1"
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.5",
122
- "react-router": "^7.9.5"
121
+ "@react-router/serve": "^7.9.6-pre.1",
122
+ "react-router": "^7.9.6-pre.1"
123
123
  },
124
124
  "peerDependenciesMeta": {
125
125
  "@vitejs/plugin-rsc": {