react-router-dom-v5-compat 6.27.0 → 6.28.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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # `react-router-dom-v5-compat`
2
2
 
3
+ ## 6.28.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies:
8
+ - `react-router-dom@6.28.0`
9
+ - `react-router@6.28.0`
10
+ - `@remix-run/router@1.21.0`
11
+
3
12
  ## 6.27.0
4
13
 
5
14
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router DOM v5 Compat v6.27.0
2
+ * React Router DOM v5 Compat v6.28.0
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import * as React from 'react';
12
12
  import * as ReactDOM from 'react-dom';
13
- import { UNSAFE_mapRouteProperties, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, Router, UNSAFE_useRoutesImpl, UNSAFE_NavigationContext, useHref, useResolvedPath, useLocation, useNavigate, createPath, UNSAFE_useRouteId, UNSAFE_RouteContext, useMatches, useNavigation, useBlocker, Routes, Route } from 'react-router';
13
+ import { UNSAFE_mapRouteProperties, UNSAFE_logV6DeprecationWarnings, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, Router, UNSAFE_useRoutesImpl, UNSAFE_NavigationContext, useHref, useResolvedPath, useLocation, useNavigate, createPath, UNSAFE_useRouteId, UNSAFE_RouteContext, useMatches, useNavigation, useBlocker, Routes, Route } from 'react-router';
14
14
  export { AbortedDeferredError, Await, MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, UNSAFE_useRouteId, createMemoryRouter, createPath, createRoutesFromChildren, createRoutesFromElements, defer, generatePath, isRouteErrorResponse, json, matchPath, matchRoutes, parsePath, redirect, redirectDocument, renderMatches, replace, resolvePath, useActionData, useAsyncError, useAsyncValue, useBlocker, useHref, useInRouterContext, useLoaderData, useLocation, useMatch, useMatches, useNavigate, useNavigation, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRevalidator, useRouteError, useRouteLoaderData, useRoutes } from 'react-router';
15
15
  import { stripBasename, UNSAFE_warning, createRouter, createBrowserHistory, createHashHistory, UNSAFE_ErrorResponseImpl, UNSAFE_invariant, joinPaths, IDLE_FETCHER, matchPath } from '@remix-run/router';
16
16
  import { parsePath, Action, createPath as createPath$1 } from 'history';
@@ -575,6 +575,7 @@ function RouterProvider(_ref) {
575
575
  let routerFuture = React.useMemo(() => ({
576
576
  v7_relativeSplatPath: router.future.v7_relativeSplatPath
577
577
  }), [router.future.v7_relativeSplatPath]);
578
+ React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future, router.future), [future, router.future]);
578
579
  // The fragment and {null} here are important! We need them to keep React 18's
579
580
  // useId happy when we are server-rendering since we may have a <script> here
580
581
  // containing the hydrated server-side staticContext (from StaticRouterProvider).
@@ -640,6 +641,7 @@ function BrowserRouter(_ref4) {
640
641
  v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);
641
642
  }, [setStateImpl, v7_startTransition]);
642
643
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
644
+ React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]);
643
645
  return /*#__PURE__*/React.createElement(Router, {
644
646
  basename: basename,
645
647
  children: children,
@@ -679,6 +681,7 @@ function HashRouter(_ref5) {
679
681
  v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);
680
682
  }, [setStateImpl, v7_startTransition]);
681
683
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
684
+ React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]);
682
685
  return /*#__PURE__*/React.createElement(Router, {
683
686
  basename: basename,
684
687
  children: children,
@@ -712,6 +715,7 @@ function HistoryRouter(_ref6) {
712
715
  v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);
713
716
  }, [setStateImpl, v7_startTransition]);
714
717
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
718
+ React.useEffect(() => UNSAFE_logV6DeprecationWarnings(future), [future]);
715
719
  return /*#__PURE__*/React.createElement(Router, {
716
720
  basename: basename,
717
721
  children: children,
@@ -969,7 +973,7 @@ var DataRouterStateHook;
969
973
  })(DataRouterStateHook || (DataRouterStateHook = {}));
970
974
  // Internal hooks
971
975
  function getDataRouterConsoleError(hookName) {
972
- return hookName + " must be used within a data router. See https://reactrouter.com/routers/picking-a-router.";
976
+ return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
973
977
  }
974
978
  function useDataRouterContext(hookName) {
975
979
  let ctx = React.useContext(UNSAFE_DataRouterContext);