react-router 0.0.0-experimental-51412399d → 0.0.0-experimental-073f56f6c

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 (60) hide show
  1. package/CHANGELOG.md +21 -49
  2. package/dist/development/{browser-CRsXgNrY.d.mts → browser-3AnU12UI.d.mts} +1 -1
  3. package/dist/development/{browser-wDl1FZEL.d.ts → browser-BOdXz9dK.d.ts} +1 -1
  4. package/dist/development/{chunk-ZL3ABFHJ.js → chunk-DTAL2P4H.js} +7 -7
  5. package/dist/{production/chunk-IHRXRDPC.js → development/chunk-G7GAQ6DB.js} +99 -99
  6. package/dist/{production/chunk-2RCPEQKS.mjs → development/chunk-JF3QLIJ3.mjs} +2 -2
  7. package/dist/development/{chunk-SVMMCML6.mjs → chunk-JMYIHYFE.mjs} +210 -99
  8. package/dist/development/{chunk-GKLAGYEJ.js → chunk-W74L3N3X.js} +238 -127
  9. package/dist/development/{context-BQs41HrG.d.mts → context-ByvtofY2.d.mts} +7 -1
  10. package/dist/development/dom-export.d.mts +2 -2
  11. package/dist/development/dom-export.d.ts +2 -2
  12. package/dist/development/dom-export.js +48 -50
  13. package/dist/development/dom-export.mjs +23 -25
  14. package/dist/development/{index-react-server-client-CSv-KZBk.d.ts → index-react-server-client-CK5fBojp.d.ts} +1 -1
  15. package/dist/{production/index-react-server-client-Ck_yZ1qL.d.mts → development/index-react-server-client-DwQvbs9m.d.mts} +1 -1
  16. package/dist/development/index-react-server-client.d.mts +2 -2
  17. package/dist/development/index-react-server-client.d.ts +2 -2
  18. package/dist/development/index-react-server-client.js +4 -4
  19. package/dist/development/index-react-server-client.mjs +2 -2
  20. package/dist/development/index-react-server.d.mts +6 -0
  21. package/dist/development/index-react-server.d.ts +6 -0
  22. package/dist/development/index-react-server.js +1 -1
  23. package/dist/development/index-react-server.mjs +1 -1
  24. package/dist/development/index.d.mts +66 -9
  25. package/dist/development/index.d.ts +66 -9
  26. package/dist/development/index.js +85 -83
  27. package/dist/development/index.mjs +5 -3
  28. package/dist/development/{instrumentation-DlJ2QV7d.d.ts → instrumentation-cRWWLfsU.d.ts} +7 -1
  29. package/dist/development/lib/types/internal.js +1 -1
  30. package/dist/development/lib/types/internal.mjs +1 -1
  31. package/dist/production/{browser-CRsXgNrY.d.mts → browser-3AnU12UI.d.mts} +1 -1
  32. package/dist/production/{browser-wDl1FZEL.d.ts → browser-BOdXz9dK.d.ts} +1 -1
  33. package/dist/production/{chunk-DC7JPQBT.js → chunk-2CG4IJO4.js} +238 -127
  34. package/dist/production/{chunk-QO54DH43.js → chunk-7C2JPQDH.js} +7 -7
  35. package/dist/production/{chunk-OYRGGHOQ.mjs → chunk-BRF4GHOX.mjs} +210 -99
  36. package/dist/{development/chunk-5WN7IGPD.mjs → production/chunk-E5QNHLMM.mjs} +2 -2
  37. package/dist/{development/chunk-BIEE535F.js → production/chunk-Z2XLV6IQ.js} +99 -99
  38. package/dist/production/{context-BQs41HrG.d.mts → context-ByvtofY2.d.mts} +7 -1
  39. package/dist/production/dom-export.d.mts +2 -2
  40. package/dist/production/dom-export.d.ts +2 -2
  41. package/dist/production/dom-export.js +48 -50
  42. package/dist/production/dom-export.mjs +23 -25
  43. package/dist/production/{index-react-server-client-CSv-KZBk.d.ts → index-react-server-client-CK5fBojp.d.ts} +1 -1
  44. package/dist/{development/index-react-server-client-Ck_yZ1qL.d.mts → production/index-react-server-client-DwQvbs9m.d.mts} +1 -1
  45. package/dist/production/index-react-server-client.d.mts +2 -2
  46. package/dist/production/index-react-server-client.d.ts +2 -2
  47. package/dist/production/index-react-server-client.js +4 -4
  48. package/dist/production/index-react-server-client.mjs +2 -2
  49. package/dist/production/index-react-server.d.mts +6 -0
  50. package/dist/production/index-react-server.d.ts +6 -0
  51. package/dist/production/index-react-server.js +1 -1
  52. package/dist/production/index-react-server.mjs +1 -1
  53. package/dist/production/index.d.mts +66 -9
  54. package/dist/production/index.d.ts +66 -9
  55. package/dist/production/index.js +85 -83
  56. package/dist/production/index.mjs +5 -3
  57. package/dist/production/{instrumentation-DlJ2QV7d.d.ts → instrumentation-cRWWLfsU.d.ts} +7 -1
  58. package/dist/production/lib/types/internal.js +1 -1
  59. package/dist/production/lib/types/internal.mjs +1 -1
  60. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,78 +4,50 @@
4
4
 
5
5
  ### Minor Changes
6
6
 
7
- - Stabilize `unstable_defaultShouldRevalidate` as `defaultShouldRevalidate` on `<Link>`, `<Form>`, `useLinkClickHandler`, `useSubmit`, `fetcher.submit`, and `setSearchParams` ([#14999](https://github.com/remix-run/react-router/pull/14999))
8
-
9
- - Stabilize the instrumentation APIs. `unstable_instrumentations` is now `instrumentations` and `unstable_pattern` is now `pattern` ([#14999](https://github.com/remix-run/react-router/pull/14999))
7
+ - Stabilize `unstable_defaultShouldRevalidate` as `defaultShouldRevalidate` on `<Link>`, `<Form>`, `useLinkClickHandler`, `useSubmit`, `fetcher.submit`, and `setSearchParams` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
8
+ - ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
10
9
 
10
+ - Stabilize the instrumentation APIs. `unstable_instrumentations` is now `instrumentations` and `unstable_pattern` is now `pattern` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
11
11
  - The `unstable_ServerInstrumentation`, `unstable_ClientInstrumentation`, `unstable_InstrumentRequestHandlerFunction`, `unstable_InstrumentRouterFunction`, `unstable_InstrumentRouteFunction`, and `unstable_InstrumentationHandlerResult` types have had their `unstable_` prefixes removed
12
+ - ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
12
13
 
13
- - Stabilize `unstable_mask` as `mask` on `<Link>`, `useLinkClickHandler`, and `useNavigate`, and rename the corresponding `Location.unstable_mask` field to `Location.mask` ([#14999](https://github.com/remix-run/react-router/pull/14999))
14
+ - Stabilize `unstable_mask` as `mask` on `<Link>`, `useLinkClickHandler`, and `useNavigate`, and rename the corresponding `Location.unstable_mask` field to `Location.mask` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
15
+ - ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
14
16
 
15
- - Stabilize the `unstable_normalizePath` option on `staticHandler.query` and `staticHandler.queryRoute` as `normalizePath` ([#14999](https://github.com/remix-run/react-router/pull/14999))
17
+ - Stabilize the `unstable_normalizePath` option on `staticHandler.query` and `staticHandler.queryRoute` as `normalizePath` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
18
+ - ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
16
19
 
17
- - Stabilize `future.unstable_passThroughRequests` as `future.v8_passThroughRequests` ([#14999](https://github.com/remix-run/react-router/pull/14999))
20
+ - Stabilize `future.unstable_passThroughRequests` as `future.v8_passThroughRequests` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
21
+ - ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
18
22
 
19
- - Remove `unstable_subResourceIntegrity` from the runtime `FutureConfig` type; the flag is now controlled by the top-level `subResourceIntegrity` option in `react-router.config.ts` ([#14999](https://github.com/remix-run/react-router/pull/14999))
23
+ - Remove `unstable_subResourceIntegrity` from the runtime `FutureConfig` type; the flag is now controlled by the top-level `subResourceIntegrity` option in `react-router.config.ts` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
24
+ - ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
20
25
 
21
- - Stabilize `unstable_url` as `url` on `loader`, `action`, and `middleware` function args ([#14999](https://github.com/remix-run/react-router/pull/14999))
26
+ - Stabilize `unstable_url` as `url` on `loader`, `action`, and `middleware` function args ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
27
+ - ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
22
28
 
23
- - Stabilize `unstable_useTransitions` as `useTransitions` on `<BrowserRouter>`, `<HashRouter>`, `<HistoryRouter>`, `<MemoryRouter>`, `<Router>`, `<RouterProvider>`, `<HydratedRouter>`, and `useLinkClickHandler` ([#14999](https://github.com/remix-run/react-router/pull/14999))
29
+ - Stabilize `unstable_useTransitions` as `useTransitions` on `<BrowserRouter>`, `<HashRouter>`, `<HistoryRouter>`, `<MemoryRouter>`, `<Router>`, `<RouterProvider>`, `<HydratedRouter>`, and `useLinkClickHandler` ([a993f09](https://github.com/remix-run/react-router/commit/a993f09))
30
+ - ⚠️ This is a breaking change if you have already opted into the unstable version - you will need to update your code accordingly
24
31
 
25
32
  ### Patch Changes
26
33
 
27
- - Add nonce to scripts modulepreload ([#15002](https://github.com/remix-run/react-router/pull/15002))
34
+ - Add `nonce` to `<Scripts>` `<link rel="modulepreload">` elements (if provided) ([af5d49b](https://github.com/remix-run/react-router/commit/af5d49b))
28
35
 
29
36
  - Fix a bug with `unstable_defaultShouldRevalidate={false}` where parent routes that did not export a `shouldRevalidate` function could be incorrectly included in the single fetch call for new child route data ([#15012](https://github.com/remix-run/react-router/pull/15012))
30
37
 
31
- - Improve server-side route matching performance by pre-computing flattened/cached route branches ([#14967](https://github.com/remix-run/react-router/pull/14967)) ([10a9686](https://github.com/remix-run/react-router/commit/10a9686))
32
-
33
- - Performance benchmark
34
- - 100 route app, 3000 requests @ 10x concurrency across 38 distinct paths
35
- - `dev` branch
36
- - Throughput: 826.1 req/s
37
- - Latency mean: 10.227ms
38
- - Latency p50: 11.125ms
39
- - Latency p95: 13.056ms
40
- - Latency p99: 16.753ms
41
- - Latency min: 1.739ms
42
- - Latency max: 20.268ms
43
- - This branch
44
- - Throughput: 952.7 req/s (15.3% improvement)
45
- - Latency mean: 8.716ms (14.8% improvement)
46
- - Latency p50: 9.452ms
47
- - Latency p95: 11.610ms
48
- - Latency p99: 12.544ms
49
- - Latency min: 1.656ms
50
- - Latency max: 15.936ms
38
+ - Improve server-side route matching performance by pre-computing flattened/cached route branches ([#14967](https://github.com/remix-run/react-router/pull/14967)) ([af5d49b](https://github.com/remix-run/react-router/commit/af5d49b))
39
+ - Performance benchmarks showed roughly a 10-15% improvement in server-side request handling performance
51
40
 
52
41
  - Mark `mask` as an optional field in `Location` for easier mocking in unit tests ([#14999](https://github.com/remix-run/react-router/pull/14999))
53
42
 
54
43
  - Cache flattened/ranked route branches to optimize server-side route matching ([#14967](https://github.com/remix-run/react-router/pull/14967))
55
44
 
56
- - Improve route matching performance in Framework/Data Mode ([#14971](https://github.com/remix-run/react-router/pull/14971)) ([362635b](https://github.com/remix-run/react-router/commit/362635b))
57
-
45
+ - Improve route matching performance in Framework/Data Mode ([#14971](https://github.com/remix-run/react-router/pull/14971)) ([af5d49b](https://github.com/remix-run/react-router/commit/af5d49b))
58
46
  - Avoiding unnecessary calls to `matchRoutes` in data router scenarios
59
47
  - This includes adding back the optimization that was removed in `7.6.0` ([#13562](https://github.com/remix-run/react-router/pull/13562))
60
48
  - The issues that prompted the revert have been addressed by using the available router `matches` but always updating `match.route` to the latest route in the `manifest`
61
49
  - Leverage pre-computed pre-computing flattened/cached route branches during client side route matching
62
- - This builds on top of prior server optimizations and provides an additional set of gains (~30%):
63
- - Original server optimizations branch
64
- - Throughput: 952.7 req/s
65
- - Latency mean: 8.716ms
66
- - Latency p50: 9.452ms
67
- - Latency p95: 11.610ms
68
- - Latency p99: 12.544ms
69
- - Latency min: 1.656ms
70
- - Latency max: 15.936ms
71
- - This branch
72
- - Throughput: 1235.3 req/s
73
- - Latency mean: 6.095ms
74
- - Latency p50: 6.655ms
75
- - Latency p95: 8.327ms
76
- - Latency p99: 12.133ms
77
- - Latency min: 1.066ms
78
- - Latency max: 19.056ms
50
+ - Performance benchmarks showed roughly a 15-30% improvement in server-side request handling performance
79
51
 
80
52
  ## v7.14.2
81
53
 
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { R as RouterInit } from './context-BQs41HrG.mjs';
2
+ import { R as RouterInit } from './context-ByvtofY2.mjs';
3
3
  import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './data-BVUf681J.mjs';
4
4
 
5
5
  declare function getRequest(): Request;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { R as RouterInit } from './instrumentation-DlJ2QV7d.js';
2
+ import { R as RouterInit } from './instrumentation-cRWWLfsU.js';
3
3
  import { L as Location, C as ClientActionFunction, a as ClientLoaderFunction, b as LinksFunction, M as MetaFunction, S as ShouldRevalidateFunction, P as Params, c as RouterContextProvider, A as ActionFunction, H as HeadersFunction, d as LoaderFunction } from './data-BqZ2x964.js';
4
4
 
5
5
  declare function getRequest(): Request;
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
2
- * react-router v0.0.0-experimental-51412399d
2
+ * react-router v0.0.0-experimental-073f56f6c
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
 
17
- var _chunkGKLAGYEJjs = require('./chunk-GKLAGYEJ.js');
17
+ var _chunkW74L3N3Xjs = require('./chunk-W74L3N3X.js');
18
18
 
19
19
  // lib/dom/ssr/hydration.tsx
20
20
  function getHydrationData({
@@ -29,12 +29,12 @@ function getHydrationData({
29
29
  ...state,
30
30
  loaderData: { ...state.loaderData }
31
31
  };
32
- let initialMatches = _chunkGKLAGYEJjs.matchRoutes.call(void 0, routes, location, basename);
32
+ let initialMatches = _chunkW74L3N3Xjs.matchRoutes.call(void 0, routes, location, basename);
33
33
  if (initialMatches) {
34
34
  for (let match of initialMatches) {
35
35
  let routeId = match.route.id;
36
36
  let routeInfo = getRouteInfo(routeId);
37
- if (_chunkGKLAGYEJjs.shouldHydrateRouteLoader.call(void 0,
37
+ if (_chunkW74L3N3Xjs.shouldHydrateRouteLoader.call(void 0,
38
38
  routeId,
39
39
  routeInfo.clientLoader,
40
40
  routeInfo.hasLoader,
@@ -112,7 +112,7 @@ function RSCDefaultRootErrorBoundaryImpl({
112
112
  }
113
113
  }
114
114
  );
115
- if (_chunkGKLAGYEJjs.isRouteErrorResponse.call(void 0, error)) {
115
+ if (_chunkW74L3N3Xjs.isRouteErrorResponse.call(void 0, error)) {
116
116
  return /* @__PURE__ */ _react2.default.createElement(
117
117
  ErrorWrapper,
118
118
  {
@@ -120,7 +120,7 @@ function RSCDefaultRootErrorBoundaryImpl({
120
120
  title: "Unhandled Thrown Response!"
121
121
  },
122
122
  /* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
123
- _chunkGKLAGYEJjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
123
+ _chunkW74L3N3Xjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
124
124
  );
125
125
  }
126
126
  let errorInstance;
@@ -146,7 +146,7 @@ function RSCDefaultRootErrorBoundaryImpl({
146
146
  function RSCDefaultRootErrorBoundary({
147
147
  hasRootLayout
148
148
  }) {
149
- let error = _chunkGKLAGYEJjs.useRouteError.call(void 0, );
149
+ let error = _chunkW74L3N3Xjs.useRouteError.call(void 0, );
150
150
  if (hasRootLayout === void 0) {
151
151
  throw new Error("Missing 'hasRootLayout' prop");
152
152
  }