-
Notifications
You must be signed in to change notification settings - Fork 386
refactor: guard react router consistency #3724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 1c05a80 The changes in this PR will be included in the next version bump. This PR includes changesets to release 207 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #3724 +/- ##
==========================================
+ Coverage 57.59% 58.13% +0.54%
==========================================
Files 672 643 -29
Lines 17794 17183 -611
Branches 3876 3752 -124
==========================================
- Hits 10249 9990 -259
+ Misses 6934 6592 -342
+ Partials 611 601 -10 ☔ View full report in Codecov by Sentry. |
Summary
The versions of
react-router-domand@remix-run/routermust match exactly.@modern-js/plugin-data-loaderhas a direct dependency on@remix-run/router, while@modern-js/runtimedepends on it transitively throughreact-router-dom. To ensure version consistency, we have moved packages related to react-router to@modern-js/utils. Packages in modernjs now import router-related APIs from@modern-js/utils.Additionally, due to a change in the DeferredData check logic in react-router (see remix-run/react-router#10247), we can now directly export APIs such as
deferfromreact-router-dominstead of from@remix-run/router.Details
🤖 Generated by Copilot at 0e09080
@modern-js/utilspackage and its consumers to use more specific and modular submodules (link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link,link)@modern-js/utils/runtime/remix-routerthat contains the types and functions related to the@remix-run/routerpackage, such asUNSAFE_DeferredData,defer, andredirect(link,link,link,link,link)@modern-js/utils/runtime/nested-routesthat contains the functions related to the nested routes feature, such astransformNestedRoutesandrenderNestedRoute(link,link,link,link)@modern-js/utils/runtime-node/routerthat re-exports some of the types and functions fromreact-router-dom/serverand adds some custom ones, such ascreateStaticHandlerandStaticHandlerContext(link,link,link,link,link)react-router-domto use the re-exported versions from@modern-js/utils/runtime/router, which ensures consistency and avoids multiple versions ofreact-router-dom(link,link,link,link,link,link,link,link,link,link)@modern-js/utilspackage to remove the@remix-run/routerdependency, update thereact-router-domdependency to the exact version6.11.2, and remove thereact-router-dompeer dependency (link)react-router-domdependency from the@modern-js/runtimepackage, since it is not directly used by the package, but only re-exported from the@modern-js/utils/runtime/routermodule (link)@modern-js/plugin-data-loader,@modern-js/runtime, and@modern-js/utils, and includes the commit message in both English and Chinese (link)Related Issue
Checklist
pnpm run change.