react-router 7.9.2 → 7.9.3

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.
Files changed (30) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/{production/chunk-DTPYDGNQ.mjs → development/chunk-65XJMMLO.mjs} +6 -10
  3. package/dist/{production/chunk-Y7UMYKHT.js → development/chunk-EUCGRVHH.js} +134 -134
  4. package/dist/development/{chunk-6Z3LVDDH.js → chunk-LZYTN6SO.js} +7 -4
  5. package/dist/development/{chunk-TMI4QPZX.mjs → chunk-NISHYRIK.mjs} +8 -5
  6. package/dist/development/dom-export.js +3 -3
  7. package/dist/development/dom-export.mjs +3 -3
  8. package/dist/development/index-react-server-client.js +4 -4
  9. package/dist/development/index-react-server-client.mjs +2 -2
  10. package/dist/development/index-react-server.js +5 -2
  11. package/dist/development/index-react-server.mjs +5 -2
  12. package/dist/development/index.js +100 -104
  13. package/dist/development/index.mjs +3 -3
  14. package/dist/development/lib/types/internal.js +1 -1
  15. package/dist/development/lib/types/internal.mjs +1 -1
  16. package/dist/production/{chunk-6XOQCZSJ.js → chunk-GWORLVRM.js} +7 -4
  17. package/dist/{development/chunk-VJDS7KU2.js → production/chunk-LHDU32KO.js} +134 -134
  18. package/dist/{development/chunk-I3JMK7SU.mjs → production/chunk-LI6FX3G6.mjs} +6 -10
  19. package/dist/production/{chunk-WLGOH3FE.mjs → chunk-VAVG4EWR.mjs} +8 -5
  20. package/dist/production/dom-export.js +3 -3
  21. package/dist/production/dom-export.mjs +3 -3
  22. package/dist/production/index-react-server-client.js +4 -4
  23. package/dist/production/index-react-server-client.mjs +2 -2
  24. package/dist/production/index-react-server.js +5 -2
  25. package/dist/production/index-react-server.mjs +5 -2
  26. package/dist/production/index.js +100 -104
  27. package/dist/production/index.mjs +3 -3
  28. package/dist/production/lib/types/internal.js +1 -1
  29. package/dist/production/lib/types/internal.mjs +1 -1
  30. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # `react-router`
2
2
 
3
+ ## 7.9.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Do not try to use `turbo-stream` to decode CDN errors that never reached the server ([#14385](https://github.com/remix-run/react-router/pull/14385))
8
+ - We used to do this but lost this check with the adoption of single fetch
9
+
10
+ - Fix Data Mode regression causing a 404 during initial load in when `middleware` exists without any `loader` functions ([#14393](https://github.com/remix-run/react-router/pull/14393))
11
+
3
12
  ## 7.9.2
4
13
 
5
14
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.9.2
2
+ * react-router v7.9.3
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -60,7 +60,7 @@ import {
60
60
  withComponentProps,
61
61
  withErrorBoundaryProps,
62
62
  withHydrateFallbackProps
63
- } from "./chunk-WLGOH3FE.mjs";
63
+ } from "./chunk-NISHYRIK.mjs";
64
64
 
65
65
  // lib/dom/ssr/server.tsx
66
66
  import * as React from "react";
@@ -1459,7 +1459,6 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
1459
1459
  }
1460
1460
  function handleQueryRouteError(error) {
1461
1461
  if (isResponse(error)) {
1462
- error.headers.set("X-Remix-Catch", "yes");
1463
1462
  return error;
1464
1463
  }
1465
1464
  if (isRouteErrorResponse(error)) {
@@ -1486,10 +1485,7 @@ function errorResponseToJson(errorResponse, serverMode) {
1486
1485
  ),
1487
1486
  {
1488
1487
  status: errorResponse.status,
1489
- statusText: errorResponse.statusText,
1490
- headers: {
1491
- "X-Remix-Error": "yes"
1492
- }
1488
+ statusText: errorResponse.statusText
1493
1489
  }
1494
1490
  );
1495
1491
  }
@@ -2160,8 +2156,8 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
2160
2156
  let res = await fetchImplementation(
2161
2157
  new Request(url, await createRequestInit(request))
2162
2158
  );
2163
- if (res.status === 404 && !res.headers.has("X-Remix-Response")) {
2164
- throw new ErrorResponseImpl(404, "Not Found", true);
2159
+ if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
2160
+ throw new ErrorResponseImpl(res.status, res.statusText, await res.text());
2165
2161
  }
2166
2162
  invariant(res.body, "No response body to decode");
2167
2163
  try {
@@ -2649,7 +2645,7 @@ async function routeRSCServerRequest({
2649
2645
  headers2.delete("Content-Encoding");
2650
2646
  headers2.delete("Content-Length");
2651
2647
  headers2.delete("Content-Type");
2652
- headers2.delete("x-remix-response");
2648
+ headers2.delete("X-Remix-Response");
2653
2649
  headers2.set("Location", payload.location);
2654
2650
  return new Response(serverResponseB?.body || "", {
2655
2651
  headers: headers2,