react-router 0.0.0-experimental-6129054f2 → 0.0.0-experimental-21239dcc5
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 +26 -0
- package/dist/{production/chunk-CZ7COEID.mjs → development/chunk-GR7RC3WS.mjs} +63 -58
- package/dist/development/{chunk-GVRDVFFT.js → chunk-Q3AMU42L.js} +270 -156
- package/dist/development/{chunk-V7XCOW4D.mjs → chunk-QGKWD3GV.mjs} +120 -3
- package/dist/development/{chunk-HEIMATDI.js → chunk-S7R7UTHP.js} +5 -2
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.js +5 -2
- package/dist/development/index-react-server.mjs +5 -2
- package/dist/development/index.js +157 -152
- package/dist/development/index.mjs +3 -3
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{chunk-OOF74SUO.js → chunk-4XK7QJE2.js} +270 -156
- package/dist/production/{chunk-SACION7U.js → chunk-DENBF62W.js} +5 -2
- package/dist/production/{chunk-VFIGYMDS.mjs → chunk-H5L5D2VB.mjs} +120 -3
- package/dist/{development/chunk-Z7MCD4ZU.mjs → production/chunk-NFHTXHYV.mjs} +63 -58
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.js +5 -2
- package/dist/production/index-react-server.mjs +5 -2
- package/dist/production/index.js +157 -152
- package/dist/production/index.mjs +3 -3
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# `react-router`
|
|
2
2
|
|
|
3
|
+
## 7.9.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- - Update client-side router to run client `middleware` on initial load even if no loaders exist ([#14348](https://github.com/remix-run/react-router/pull/14348))
|
|
8
|
+
- Update `createRoutesStub` to run route middleware
|
|
9
|
+
- You will need to set the `<RoutesStub future={{ v8_middleware: true }} />` flag to enable the proper `context` type
|
|
10
|
+
|
|
11
|
+
- Update Lazy Route Discovery manifest requests to use a singular comma-separated `paths` query param instead of repeated `p` query params ([#14321](https://github.com/remix-run/react-router/pull/14321))
|
|
12
|
+
- This is because Cloudflare has a hard limit of 100 URL search param key/value pairs when used as a key for caching purposes
|
|
13
|
+
- If more that 100 paths were included, the cache key would be incomplete and could produce false-positive cache hits
|
|
14
|
+
|
|
15
|
+
- \[UNSTABLE] Add `fetcher.unstable_reset()` API ([#14206](https://github.com/remix-run/react-router/pull/14206))
|
|
16
|
+
|
|
17
|
+
- Made useOutlet element reference have stable identity in-between route chages ([#13382](https://github.com/remix-run/react-router/pull/13382))
|
|
18
|
+
|
|
19
|
+
- feat: enable full transition support for the rsc router ([#14362](https://github.com/remix-run/react-router/pull/14362))
|
|
20
|
+
|
|
21
|
+
- In RSC Data Mode, handle SSR'd client errors and re-try in the browser ([#14342](https://github.com/remix-run/react-router/pull/14342))
|
|
22
|
+
|
|
23
|
+
- Support `middleware` prop on `<Route>` for usage with a data router via `createRoutesFromElements` ([#14357](https://github.com/remix-run/react-router/pull/14357))
|
|
24
|
+
|
|
25
|
+
- Handle encoded question mark and hash characters in ancestor splat routes ([#14249](https://github.com/remix-run/react-router/pull/14249))
|
|
26
|
+
|
|
27
|
+
- Fail gracefully on manifest version mismatch logic if `sessionStorage` access is blocked ([#14335](https://github.com/remix-run/react-router/pull/14335))
|
|
28
|
+
|
|
3
29
|
## 7.9.1
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-21239dcc5
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
SingleFetchRedirectSymbol,
|
|
23
23
|
StaticRouterProvider,
|
|
24
24
|
StreamTransfer,
|
|
25
|
+
UNSTABLE_TransitionEnabledRouterProvider,
|
|
25
26
|
convertRoutesToDataRoutes,
|
|
26
27
|
createBrowserHistory,
|
|
27
28
|
createContext,
|
|
@@ -59,7 +60,7 @@ import {
|
|
|
59
60
|
withComponentProps,
|
|
60
61
|
withErrorBoundaryProps,
|
|
61
62
|
withHydrateFallbackProps
|
|
62
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-QGKWD3GV.mjs";
|
|
63
64
|
|
|
64
65
|
// lib/dom/ssr/server.tsx
|
|
65
66
|
import * as React from "react";
|
|
@@ -1856,7 +1857,7 @@ function createCallServer({
|
|
|
1856
1857
|
return async (id, args) => {
|
|
1857
1858
|
let actionId = globalVar.__routerActionID = (globalVar.__routerActionID ?? (globalVar.__routerActionID = 0)) + 1;
|
|
1858
1859
|
const temporaryReferences = createTemporaryReferenceSet();
|
|
1859
|
-
const
|
|
1860
|
+
const payloadPromise = fetchImplementation(
|
|
1860
1861
|
new Request(location.href, {
|
|
1861
1862
|
body: await encodeReply(args, { temporaryReferences }),
|
|
1862
1863
|
method: "POST",
|
|
@@ -1865,44 +1866,45 @@ function createCallServer({
|
|
|
1865
1866
|
"rsc-action-id": id
|
|
1866
1867
|
}
|
|
1867
1868
|
})
|
|
1868
|
-
)
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
}
|
|
1872
|
-
const payload = await createFromReadableStream(response.body, {
|
|
1873
|
-
temporaryReferences
|
|
1874
|
-
});
|
|
1875
|
-
if (payload.type === "redirect") {
|
|
1876
|
-
if (payload.reload) {
|
|
1877
|
-
window.location.href = payload.location;
|
|
1878
|
-
return;
|
|
1869
|
+
).then((response) => {
|
|
1870
|
+
if (!response.body) {
|
|
1871
|
+
throw new Error("No response body");
|
|
1879
1872
|
}
|
|
1880
|
-
|
|
1881
|
-
|
|
1873
|
+
return createFromReadableStream(response.body, {
|
|
1874
|
+
temporaryReferences
|
|
1882
1875
|
});
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1876
|
+
});
|
|
1877
|
+
globalVar.__reactRouterDataRouter.__setPendingRerender(
|
|
1878
|
+
Promise.resolve(payloadPromise).then(async (payload) => {
|
|
1879
|
+
if (payload.type === "redirect") {
|
|
1880
|
+
if (payload.reload) {
|
|
1881
|
+
window.location.href = payload.location;
|
|
1882
|
+
return () => {
|
|
1883
|
+
};
|
|
1884
|
+
}
|
|
1885
|
+
return () => {
|
|
1886
|
+
globalVar.__reactRouterDataRouter.navigate(payload.location, {
|
|
1887
|
+
replace: payload.replace
|
|
1888
|
+
});
|
|
1889
|
+
};
|
|
1890
|
+
}
|
|
1891
|
+
if (payload.type !== "action") {
|
|
1892
|
+
throw new Error("Unexpected payload type");
|
|
1893
|
+
}
|
|
1894
|
+
const rerender = await payload.rerender;
|
|
1895
|
+
if (rerender && landedActionId < actionId && globalVar.__routerActionID <= actionId) {
|
|
1896
|
+
if (rerender.type === "redirect") {
|
|
1897
|
+
if (rerender.reload) {
|
|
1898
|
+
window.location.href = rerender.location;
|
|
1899
|
+
return;
|
|
1900
|
+
}
|
|
1901
|
+
return () => {
|
|
1901
1902
|
globalVar.__reactRouterDataRouter.navigate(rerender.location, {
|
|
1902
1903
|
replace: rerender.replace
|
|
1903
1904
|
});
|
|
1904
|
-
|
|
1905
|
-
|
|
1905
|
+
};
|
|
1906
|
+
}
|
|
1907
|
+
return () => {
|
|
1906
1908
|
let lastMatch;
|
|
1907
1909
|
for (const match of rerender.matches) {
|
|
1908
1910
|
globalVar.__reactRouterDataRouter.patchRoutes(
|
|
@@ -1913,29 +1915,32 @@ function createCallServer({
|
|
|
1913
1915
|
lastMatch = match;
|
|
1914
1916
|
}
|
|
1915
1917
|
window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
|
|
1916
|
-
{
|
|
1918
|
+
{
|
|
1919
|
+
loaderData: Object.assign(
|
|
1920
|
+
{},
|
|
1921
|
+
globalVar.__reactRouterDataRouter.state.loaderData,
|
|
1922
|
+
rerender.loaderData
|
|
1923
|
+
),
|
|
1924
|
+
errors: rerender.errors ? Object.assign(
|
|
1925
|
+
{},
|
|
1926
|
+
globalVar.__reactRouterDataRouter.state.errors,
|
|
1927
|
+
rerender.errors
|
|
1928
|
+
) : null
|
|
1929
|
+
}
|
|
1917
1930
|
);
|
|
1918
|
-
|
|
1919
|
-
window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
|
|
1920
|
-
{
|
|
1921
|
-
loaderData: Object.assign(
|
|
1922
|
-
{},
|
|
1923
|
-
globalVar.__reactRouterDataRouter.state.loaderData,
|
|
1924
|
-
rerender.loaderData
|
|
1925
|
-
),
|
|
1926
|
-
errors: rerender.errors ? Object.assign(
|
|
1927
|
-
{},
|
|
1928
|
-
globalVar.__reactRouterDataRouter.state.errors,
|
|
1929
|
-
rerender.errors
|
|
1930
|
-
) : null
|
|
1931
|
-
}
|
|
1932
|
-
);
|
|
1933
|
-
});
|
|
1934
|
-
}
|
|
1931
|
+
};
|
|
1935
1932
|
}
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1933
|
+
return () => {
|
|
1934
|
+
};
|
|
1935
|
+
}).catch(() => {
|
|
1936
|
+
})
|
|
1937
|
+
);
|
|
1938
|
+
return payloadPromise.then((payload) => {
|
|
1939
|
+
if (payload.type !== "action" && payload.type !== "redirect") {
|
|
1940
|
+
throw new Error("Unexpected payload type");
|
|
1941
|
+
}
|
|
1942
|
+
return payload.actionResult;
|
|
1943
|
+
});
|
|
1939
1944
|
};
|
|
1940
1945
|
}
|
|
1941
1946
|
function createRouterFromPayload({
|
|
@@ -2302,7 +2307,7 @@ function RSCHydratedRouter({
|
|
|
2302
2307
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2303
2308
|
routeModules
|
|
2304
2309
|
};
|
|
2305
|
-
return /* @__PURE__ */ React4.createElement(RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(
|
|
2310
|
+
return /* @__PURE__ */ React4.createElement(RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(UNSTABLE_TransitionEnabledRouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2306
2311
|
}
|
|
2307
2312
|
function createRouteFromServerManifest(match, payload) {
|
|
2308
2313
|
let hasInitialData = payload && match.id in payload.loaderData;
|