Open
Conversation
a103245 to
efb5c11
Compare
efb5c11 to
0781256
Compare
0781256 to
ed91542
Compare
ed91542 to
d2268cb
Compare
d2268cb to
0039e46
Compare
56ba538 to
36a0c55
Compare
36a0c55 to
ebfbb85
Compare
ebfbb85 to
7983255
Compare
7983255 to
f62f92a
Compare
f62f92a to
9ad162c
Compare
9ad162c to
da77e66
Compare
da77e66 to
dd1e184
Compare
dd1e184 to
a6ae2ff
Compare
73688c1 to
7420ddf
Compare
7420ddf to
cff4216
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
7.9.1→7.14.07.9.1→7.14.0Release Notes
remix-run/react-router (@react-router/dev)
v7.14.0Compare Source
Minor Changes
Patch Changes
support for prerendering multiple server bundles with v8_viteEnvironmentApi (#14921)
rsc framework mode prerender / spa mode support (#14907)
UNSTABLE RSC FRAMEWORK MODE BREAKING CHANGE - Existing route module exports remain unchanged from stable v7 non-RSC mode, but new exports are added for RSC mode. If you want to use RSC features, you will need to update your route modules to export the new annotations. (#14901)
If you are using RSC framework mode currently, you will need to update your route modules to the new conventions. The following route module components have their own mutually exclusive server component counterparts:
ServerComponentdefaultServerErrorBoundaryErrorBoundaryServerLayoutLayoutServerHydrateFallbackHydrateFallbackIf you were previously exporting a
ServerComponent, yourErrorBoundary,Layout, andHydrateFallbackwere also server components. If you want to keep those as server components, you can rename them and prefix them withServer. If you were previously importing the implementations of those components from a client module, you can simply inline them.Example:
Before
After
update the reveal command to support rsc for
entry.client,entry.rsc,entry.ssr(#14904)Updated dependencies:
react-router@7.14.0@react-router/node@7.14.0@react-router/serve@7.14.0v7.13.2Compare Source
Patch Changes
Fix
react-router devcrash when Unix socket files exist in the project root (#14854)Escape redirect locations in prerendered redirect HTML (#14880)
Add
future.unstable_passThroughRequestsflag (#14775)By default, React Router normalizes the
request.urlpassed to yourloader,action, andmiddlewarefunctions by removing React Router's internal implementation details (.datasuffixes,index+_routesquery params).Enabling this flag removes that normalization and passes the raw HTTP
requestinstance to your handlers. This provides a few benefits:new Request()calls on the critical path.datasuffix (useful for observability purposes)If you were previously relying on the normalization of
request.url, you can switch to use the new siblingunstable_urlparameter which contains aURLinstance representing the normalized location:Add a new
unstable_url: URLparameter to route handler methods (loader,action,middleware, etc.) representing the normalized URL the application is navigating to or fetching, with React Router implementation details removed (.datasuffix,index/_routesquery params) (#14775)This is being added alongside the new
future.unstable_passthroughRequestsfuture flag so that users still have a way to access the normalized URL when that flag is enabled and non-normalizedrequest's are being passed to your handlers. When adopting this flag, you will only need to start leveraging this new parameter if you are relying on the normalization ofrequest.urlin your application code.If you don't have the flag enabled, then
unstable_urlwill matchrequest.url.Updated dependencies:
react-router@7.13.2@react-router/node@7.13.2@react-router/serve@7.13.2v7.13.1Compare Source
Patch Changes
react-router@7.13.1@react-router/node@7.13.1@react-router/serve@7.13.1v7.13.0Compare Source
Patch Changes
react-router@7.13.0@react-router/node@7.13.0@react-router/serve@7.13.0v7.12.0Compare Source
Minor Changes
react-router.config.tsconfigallowedActionOriginsfield. (#14708)Patch Changes
Fix
Maximum call stack size exceedederrors when HMR is triggered against code with cyclic imports (#14522)fix(vite): Skip SSR middleware in preview server for SPA mode (#14673)
[UNSTABLE] Add a new
future.unstable_trailingSlashAwareDataRequestsflag to provide consistent behavior ofrequest.pathnameinsidemiddleware,loader, andactionfunctions on document and data requests when a trailing slash is present in the browser URL. (#14644)Currently, your HTTP and
requestpathnames would be as follows for/a/b/cand/a/b/c//a/b/crequestpathname`/a/b/c/a/b/c✅/a/b/c.data/a/b/c✅/a/b/c/requestpathname`/a/b/c//a/b/c/✅/a/b/c.data/a/b/cWith this flag enabled, these pathnames will be made consistent though a new
_.dataformat for client-side.datarequests:/a/b/crequestpathname`/a/b/c/a/b/c✅/a/b/c.data/a/b/c✅/a/b/c/requestpathname`/a/b/c//a/b/c/✅/a/b/c/_.data⬅️/a/b/c/✅This a bug fix but we are putting it behind an opt-in flag because it has the potential to be a "breaking bug fix" if you are relying on the URL format for any other application or caching logic.
Enabling this flag also changes the format of client side
.datarequests from/_root.datato/_.datawhen navigating to/to align with the new format. This does not impact therequestpathname which is still/in all cases.Updated dependencies:
react-router@7.12.0@react-router/node@7.12.0@react-router/serve@7.12.0v7.11.0Compare Source
Minor Changes
vite previewsupport (#14507)Patch Changes
routeRSCServerRequestreplacefetchServerwithserverResponse(#14597)react-router@7.11.0@react-router/serve@7.11.0@react-router/node@7.11.0v7.10.1Compare Source
Patch Changes
pkg-typeswith a dynamicimport()to fix issues on Node 20.18 (#14624)valibotdependency to^1.2.0to address GHSA-vqpr-j7v3-hqw9 (#14608)react-router@7.10.1@react-router/node@7.10.1@react-router/serve@7.10.1v7.10.0Compare Source
Minor Changes
Stabilize
future.v8_splitRouteModules, replacingfuture.unstable_splitRouteModules(#14595)future.unstable_splitRouteModules. Please update yourreact-router.config.ts.Stabilize
future.v8_viteEnvironmentApi, replacingfuture.unstable_viteEnvironmentApi(#14595)future.unstable_viteEnvironmentApi. Please update yourreact-router.config.ts.Patch Changes
Load environment variables before evaluating
routes.ts(#14446)For example, you can now compute your routes based on
VITE_-prefixed environment variables:# .env VITE_ENV_ROUTE=my-routeUpdated dependencies:
react-router@7.10.0@react-router/node@7.10.0@react-router/serve@7.10.0v7.9.6Compare Source
Patch Changes
import()to load ESM-onlyp-mapdependency to avoid issues on Node 20.18 and below (#14492)HEADdocument requests before callingrenderToPipeableStreamin the defaultentry.server.tsxto more closely align with the spec (#14488)react-router@7.9.6@react-router/node@7.9.6@react-router/serve@7.9.6v7.9.5Compare Source
Patch Changes
prerender.unstable_concurrencyoption, to support running the prerendering concurrently, potentially speeding up the build. (#14380)/domexport. (#14457)linkelements used by dynamic imports (#14463)react-router@7.9.5@react-router/node@7.9.5@react-router/serve@7.9.5v7.9.4Compare Source
Patch Changes
Update
valibotdependency to^1.1.0(#14379)New (unstable)
useRoutehook for accessing data from specific routes (#14407)For example, let's say you have an
adminroute somewhere in your app and you want any child routes ofadminto all have access to theloaderDataandactionDatafromadmin.You might even want to create a reusable widget that all of the routes nested under
admincould use:In framework mode,
useRouteknows all your app's routes and gives you TS errors when invalid route IDs are passed in:useRoutereturnsundefinedif the route is not part of the current page:Note: the
rootroute is the exception since it is guaranteed to be part of the current page.As a result,
useRoutenever returnsundefinedforroot.loaderDataandactionDataare marked as optional since they could be accessed before theactionis triggered or after theloaderthrew an error:If instead of a specific route, you wanted access to the current route's
loaderDataandactionData, you can calluseRoutewithout arguments:This usage is equivalent to calling
useLoaderDataanduseActionData, but consolidates all route data access into one hook:useRoute.Note: when calling
useRoute()(without a route ID), TS has no way to know which route is the current route.As a result,
loaderDataandactionDataare typed asunknown.If you want more type-safety, you can either narrow the type yourself with something like
zodor you can refactor your app to pass down typed props to yourAdminWidget:Updated dependencies:
react-router@7.9.4@react-router/node@7.9.4@react-router/serve@7.9.4v7.9.3Compare Source
Patch Changes
react-router@7.9.3@react-router/node@7.9.3@react-router/serve@7.9.3v7.9.2Compare Source
Patch Changes
Fix preset future flags being ignored during config resolution (#14369)
Fixes a bug where future flags defined by presets were completely ignored. The config resolution was incorrectly reading from
reactRouterUserConfig.futureinstead of the mergeduserAndPresetConfigs.future, causing all preset-defined future flags to be lost.This fix ensures presets can properly enable experimental features as intended by the preset system design.
Add unstable support for RSC Framework Mode (#14336)
Switch internal vite plugin Response logic to use
@remix-run/node-fetch-server(#13927)Updated dependencies:
react-router@7.9.2@react-router/serve@7.9.2@react-router/node@7.9.2remix-run/react-router (@react-router/serve)
v7.14.0Compare Source
Patch Changes
react-router@7.14.0@react-router/node@7.14.0@react-router/express@7.14.0v7.13.2Compare Source
Patch Changes
react-router@7.13.2@react-router/node@7.13.2@react-router/express@7.13.2v7.13.1Compare Source
Patch Changes
react-router@7.13.1@react-router/node@7.13.1@react-router/express@7.13.1v7.13.0Compare Source
Patch Changes
react-router@7.13.0@react-router/node@7.13.0@react-router/express@7.13.0v7.12.0Compare Source
Patch Changes
react-router@7.12.0@react-router/node@7.12.0@react-router/express@7.12.0v7.11.0Compare Source
Patch Changes
compressionandmorgandependencies to addresson-headersCVE: GHSA-76c9-3jph-rj3q (#14652)react-router@7.11.0@react-router/node@7.11.0@react-router/express@7.11.0v7.10.1Compare Source
Patch Changes
react-router@7.10.1@react-router/node@7.10.1@react-router/express@7.10.1v7.10.0Compare Source
Patch Changes
react-router@7.10.0@react-router/node@7.10.0@react-router/express@7.10.0v7.9.6Compare Source
Patch Changes
react-router@7.9.6@react-router/node@7.9.6@react-router/express@7.9.6v7.9.5Compare Source
Patch Changes
react-router@7.9.5@react-router/node@7.9.5@react-router/express@7.9.5v7.9.4Compare Source
Patch Changes
react-router@7.9.4@react-router/node@7.9.4@react-router/express@7.9.4v7.9.3Compare Source
Patch Changes
react-router@7.9.3@react-router/node@7.9.3@react-router/express@7.9.3v7.9.2Compare Source
Patch Changes
react-router@7.9.2@react-router/node@7.9.2@react-router/express@7.9.2Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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 was generated by Mend Renovate. View the repository job log.