-
Notifications
You must be signed in to change notification settings - Fork 6
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
Upgrade react router #782
Upgrade react router #782
Conversation
Bundle ReportChanges will increase total bundle size by 38.56kB (0.41%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #782 +/- ##
==========================================
+ Coverage 83.32% 83.41% +0.09%
==========================================
Files 239 240 +1
Lines 4750 4752 +2
Branches 1268 1275 +7
==========================================
+ Hits 3958 3964 +6
+ Misses 757 754 -3
+ Partials 35 34 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
293f6fb
to
a9f126d
Compare
a9f126d
to
b05c731
Compare
Before enabling all the future flags etc.
…aviour Following the upgrade instructions of the official documentation.
These are for features that we don't make use of yet, following the docs to just enable them and rely on our test suites.
* Removed the future flags again * Replaced the react-router-dom package with react-router
This should probably come via our shared Maykin config... In essence, import-js/eslint-plugin-import#2862 describes the problem that the typescript-eslint-plugin parser is not hoisted to the top-level node modules, and it's being dynamically imported during linting of src/sdk.jsx which loads react-router/dom, which has typescript declaration files. Adding this explicit dependency makes the linter error go away.
In vitest the react-router and react-router/dom imports resolve to (CommonJS?) bundles which each contain copies of the contexts/objects used by react router, which make you effectively end up with multiple installations of react router. This leads to broken contexts and failing tests, see remix-run/react-router#12785 for more context. Patching the resolution in vite config allows us to force loading the mjs modules instead of the CJS build which doesn't have this problem, because both the react-router and react-router/dom entrypoints depend on the same chunk containing the shared code.
b05c731
to
12e2591
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Closes open-formulieren/open-forms#4929