fix(deps): update react-router monorepo to v7 #58
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/react-router-monorepo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
6.28.0
->7.0.1
6.28.0
->7.0.1
Release Notes
remix-run/react-router (react-router)
v7.0.1
Compare Source
v7.0.0
Compare Source
Major Changes
Remove the original
defer
implementation in favor of using raw promises via single fetch andturbo-stream
. This removes these exports from React Router: (#11744)defer
AbortedDeferredError
type TypedDeferredData
UNSAFE_DeferredData
UNSAFE_DEFERRED_SYMBOL
,@remix-run/router
intoreact-router
(#11505)react-router-dom
intoreact-router
@remix-run/server-runtime
intoreact-router
@remix-run/testing
intoreact-router
Remove single_fetch future flag. (#11522)
Drop support for Node 16, React Router SSR now requires Node 18 or higher (#11391)
Remove
future.v7_startTransition
flag (#11696)useNavigate()
useSubmit
useFetcher().load
useFetcher().submit
useRevalidator.revalidate
Remove
future.v7_normalizeFormMethod
future flag (#11697)For Remix consumers migrating to React Router, the
crypto
global from the Web Crypto API is now required when using cookie and session APIs. This means that the following APIs are provided fromreact-router
rather than platform-specific packages: (#11837)createCookie
createCookieSessionStorage
createMemorySessionStorage
createSessionStorage
For consumers running older versions of Node, the
installGlobals
function from@remix-run/node
has been updated to defineglobalThis.crypto
, using Node'srequire('node:crypto').webcrypto
implementation.Since platform-specific packages no longer need to implement this API, the following low-level APIs have been removed:
createCookieFactory
createSessionStorageFactory
createCookieSessionStorageFactory
createMemorySessionStorageFactory
Imports/Exports cleanup (#11840)
@remix-run/router
AgnosticDataIndexRouteObject
AgnosticDataNonIndexRouteObject
AgnosticDataRouteMatch
AgnosticDataRouteObject
AgnosticIndexRouteObject
AgnosticNonIndexRouteObject
AgnosticRouteMatch
AgnosticRouteObject
TrackedPromise
unstable_AgnosticPatchRoutesOnMissFunction
Action
-> exported asNavigationType
viareact-router
Router
exported asDataRouter
to differentiate from RR's<Router>
getToPathname
(@private
)joinPaths
(@private
)normalizePathname
(@private
)resolveTo
(@private
)stripBasename
(@private
)createBrowserHistory
-> in favor ofcreateBrowserRouter
createHashHistory
-> in favor ofcreateHashRouter
createMemoryHistory
-> in favor ofcreateMemoryRouter
createRouter
createStaticHandler
-> in favor of wrappercreateStaticHandler
in RR DomgetStaticContextFromError
react-router
Hash
Pathname
Search
update minimum node version to 18 (#11690)
Remove
future.v7_prependBasename
from the ionternalized@remix-run/router
package (#11726)Migrate Remix type generics to React Router (#12180)
Route.*
typesRoute.*
typesuseFetcher
previously had an optional generic (used primarily by Remix v2) that expected the data typetypeof loader
/typeof action
)useFetcher<LoaderData>()
useFetcher<typeof loader>()
Remove
future.v7_throwAbortReason
from internalized@remix-run/router
package (#11728)Add
exports
field to all packages (#11675)node package no longer re-exports from react-router (#11702)
renamed RemixContext to FrameworkContext (#11705)
updates the minimum React version to 18 (#11689)
PrefetchPageDescriptor replaced by PageLinkDescriptor (#11960)
@remix-run/router
,@remix-run/server-runtime
, and@remix-run/react
now that they all live inreact-router
(#12177)LoaderFunction
,LoaderFunctionArgs
,ActionFunction
,ActionFunctionArgs
,DataFunctionArgs
,RouteManifest
,LinksFunction
,Route
,EntryRoute
RouteManifest
type used by the "remix" code is now slightly stricter because it is using the former@remix-run/router
RouteManifest
Record<string, Route> -> Record<string, Route | undefined>
AppData
type in favor of inliningunknown
in the few locations it was usedServerRuntimeMeta*
types in favor of theMeta*
types they were duplicated fromfuture.v7_partialHydration
flag (#11725)<RouterProvider fallbackElement>
propfallbackElement
to ahydrateFallbackElement
/HydrateFallback
on your root routefuture.v7_partialHydration
(when usingfallbackElement
),state.navigation
was populated during the initial loadfuture.v7_partialHydration
,state.navigation
remains in an"idle"
state during the initial loadRemove
v7_relativeSplatPath
future flag (#11695)Drop support for Node 18, update minimum Node vestion to 20 (#12171)
installGlobals()
as this should no longer be necessaryRemove remaining future flags (#11820)
v7_skipActionErrorRevalidation
v3_fetcherPersist
,v3_relativeSplatPath
,v3_throwAbortReason
rename createRemixStub to createRoutesStub (#11692)
Remove
@remix-run/router
deprecateddetectErrorBoundary
option in favor ofmapRouteProperties
(#11751)Add
react-router/dom
subpath export to properly enablereact-dom
as an optionalpeerDependency
(#11851)import ReactDOM from "react-dom"
in<RouterProvider>
in order to accessReactDOM.flushSync()
, since that would breakcreateMemoryRouter
use cases in non-DOM environmentsreact-router/dom
to get the proper component that makesReactDOM.flushSync()
available:entry.client.tsx
:import { HydratedRouter } from 'react-router/dom'
createBrowserRouter
/createHashRouter
:import { RouterProvider } from "react-router/dom"
Remove
future.v7_fetcherPersist
flag (#11731)Update
cookie
dependency to^1.0.1
- please see the release notes for any breaking changes (#12172)Minor Changes
prerender
config in the React Router vite plugin, to support existing SSG use-cases (#11539)prerender
config to pre-render your.html
and.data
files at build time and then serve them statically at runtime (either from a running server or a CDN)prerender
can either be an array of string paths, or a function (sync or async) that returns an array of strings so that you can dynamically generate the paths by talking to your CMS, etc.Params, loader data, and action data as props for route component exports (#11961)
Remove duplicate
RouterProvider
impliementations (#11679)Typesafety improvements (#12019)
React Router now generates types for each of your route modules.
You can access those types by importing them from
./+types.<route filename without extension>
.For example:
This initial implementation targets type inference for:
Params
: Path parameters from your routing config inroutes.ts
including file-based routingLoaderData
: Loader data fromloader
and/orclientLoader
within your route moduleActionData
: Action data fromaction
and/orclientAction
within your route moduleIn the future, we plan to add types for the rest of the route module exports:
meta
,links
,headers
,shouldRevalidate
, etc.We also plan to generate types for typesafe
Link
s:Check out our docs for more:
Stabilize
unstable_dataStrategy
(#11969)Stabilize
unstable_patchRoutesOnNavigation
(#11970)Patch Changes
No changes (
506329c4e
)chore: re-enable development warnings through a
development
exports condition. (#12269)Remove unstable upload handler. (#12015)
Remove unneeded dependency on @web3-storage/multipart-parser (#12274)
Fix redirects returned from loaders/actions using
data()
(#12021)fix(react-router): (v7) fix static prerender of non-ascii characters (#12161)
Replace
substr
withsubstring
(#12080)Remove the deprecated
json
utility (#12146)Response.json
if you still need to construct JSON responses in your appRemove unneeded dependency on source-map (#12275)
remix-run/react-router (react-router-dom)
v7.0.1
Compare Source
Patch Changes
react-router@7.0.1
v7.0.0
Compare Source
Major Changes
Remove the original
defer
implementation in favor of using raw promises via single fetch andturbo-stream
. This removes these exports from React Router: (#11744)defer
AbortedDeferredError
type TypedDeferredData
UNSAFE_DeferredData
UNSAFE_DEFERRED_SYMBOL
,Use
createRemixRouter
/RouterProvider
inentry.client
instead ofRemixBrowser
(#11469)Remove single_fetch future flag. (#11522)
Remove
future.v7_startTransition
flag (#11696)Remove
future.v7_normalizeFormMethod
future flag (#11697)Allow returning
undefined
from actions and loaders (#11680)update minimum node version to 18 (#11690)
Remove
future.v7_prependBasename
from the ionternalized@remix-run/router
package (#11726)Remove
future.v7_throwAbortReason
from internalized@remix-run/router
package (#11728)Add
exports
field to all packages (#11675)node package no longer re-exports from react-router (#11702)
updates the minimum React version to 18 (#11689)
future.v7_partialHydration
flag (#11725)<RouterProvider fallbackElement>
propfallbackElement
to ahydrateFallbackElement
/HydrateFallback
on your root routefuture.v7_partialHydration
(when usingfallbackElement
),state.navigation
was populated during the initial loadfuture.v7_partialHydration
,state.navigation
remains in an"idle"
state during the initial loadRemove
future.v7_fetcherPersist
flag (#11731)Minor Changes
Link
/NavLink
when using Remix SSR (#11402)ScrollRestoration
so it can restore properly on an SSR'd document load (#11401)RouterProvider
. When running from a Remix-SSR'd HTML payload with the properwindow
variables (__remixContext
,__remixManifest
,__remixRouteModules
), you don't need to pass arouter
prop andRouterProvider
will create therouter
for you internally. (#11396) (#11400)Patch Changes
RouterProvider
internals to reduce uneccesary re-renders (#11817)react-router@7.0.0
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Renovate Bot.
Checkout
From your project repository, check out a new branch and test the changes.