Repository navigation
fix(web-reporter-ui): depend on react-dom 18 - #391
Merged
Merged
Conversation
web-reporter-ui depends on react 18 but not on react-dom, which MUI requires as a peer dependency. npm then installs the latest react-dom that satisfies MUI's peer range: react-dom 19, which requires react 19, so installing @perf-profiler/web-reporter-ui from npm gives a conflicting react/react-dom pair (`npm warn ERESOLVE overriding peer dependency`). The published 0.16.1 already has this conflict, and MUI 9 keeps accepting react-dom 19. Declare react-dom with the same range as react. Verified by packing the packages and installing them from the tarballs in an empty project: web-reporter-ui now gets react 18.3.1 and react-dom 18.3.1 without peer conflicts, and the generated web report renders with no JS errors. The installs of measure and e2e are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for flashlight-docs canceled.
|
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.
Why
@perf-profiler/web-reporter-uidepends onreact@^18.0.0but not onreact-dom, which MUI requires as a peer dependency. When installing it from npm, npm picks the latestreact-domthat satisfies MUI's peer range,react-dom@19, which itself requiresreact@19:The published 0.16.1 already has this conflict, and the MUI 9 upgrade keeps accepting
react-dom@19. The package gets ~12k downloads a month, so fixing it before the next release.What
Declare
react-domwith the same range asreact(^18.0.0). The lockfile only adds the range to the existingreact-dom@18.3.1entry.Tested
yarn test: 60 tests, 22 snapshots, lint and build pass.web-reporter-ui:react@18.3.1+react-dom@18.3.1, no peer conflict (wasreact-dom@19.3.1before)measureande2e: unchanged compared to the published versionsweb-reporterCLI and rendered it in Chromium: 4 charts, metric rows expand, no JS errors.🤖 Generated with Claude Code