Skip to content

chore(deps): take react and react-dom to 19 in one change - #404

Open
IanoNjuguna wants to merge 1 commit into
IntersectMBO:mainfrom
IanoNjuguna:chore/deps-react-19
Open

IanoNjuguna wants to merge 1 commit into
IntersectMBO:mainfrom
IanoNjuguna:chore/deps-react-19

Conversation

@IanoNjuguna

Copy link
Copy Markdown
Contributor

Description

Takes react and react-dom to 19 in one change, with a regenerated lockfile.

Dependabot opened the major as two PRs and neither can pass alone, because each half breaks the other's peer requirement:

#402 (react-dom): Found: react@18.3.1
                  could not resolve peer react@^19.3.1 from react-dom@19.3.1

#401 (react):     Found: react@19.3.1
                  could not resolve peer react-dom@^18.3.1 from react-dom@18.3.1

Merging them back to back does not work either: deploy.yml runs on every push to main, so between the two merges the tracked lockfile does not resolve, the build job fails and the Pages deploy is skipped. Any PR updated in that window inherits the broken lockfile.

This PR supersedes #401 and #402 and closes #403.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Dependency major (no box above covers a version bump)

Testing

  • I have tested these changes locally
  • I have checked for broken links
  • Code examples have been tested

Checklist

  • My code follows the style guidelines
  • I have performed a self-review
  • I have made corresponding changes to documentation
  • My changes generate no new warnings

Verification

Run in a worktree of main at 973801b, after git checkout of this branch:

npm install --ignore-scripts     added 1409 packages, no ERESOLVE
npm ci                           exit 0, 0 npm error lines
node -p "require('react/package.json').version"       19.3.1
npm run build                    [SUCCESS] Generated static files in "build"

On the warnings:

  • @docusaurus/core 3.10.2 declares react ^18.0.0 || ^19.0.0, so 19 is inside its supported range.
  • The @slorber/react-helmet-async alias that @docusaurus/core depends on still advertises a peer range capped at react 18. It reports npm warn and the install exits 0; the build is clean.
  • My local build ran on Node 24.18.1 against CI's pinned 22.23.4. Same major, and the build is not engine-gated.

Notes

  • The lockfile is regenerated, not hand-edited. Its diff is large (about 2577 lines) because npm re-resolves the whole tree at the new peer set.
  • @types/react-dom goes to ^19.3.0; 19.3.1 does not exist.
  • Deliberately left alone, as separate cleanup: website/package.json still has packageManager: yarn@1.22.22 and a resolutions block pinning react and react-dom to ^18.3.1. npm ignores both, but a yarn install would restore react 18. Noted on react 19: the Dependabot halves cannot resolve alone, so the bump needs one combined PR #403.
  • Optional follow-up: a groups entry in .github/dependabot.yml covering the react peer set, so the next major arrives as one PR.

Dependabot opened this major as two PRs, IntersectMBO#401 for react and IntersectMBO#402 for
react-dom plus @types/react-dom. Each half breaks the other's peer
requirement, so neither can pass npm ci on its own:

  IntersectMBO#402: Found: react@18.3.1, could not resolve peer react@^19.3.1
        from react-dom@19.3.1
  IntersectMBO#401: Found: react@19.3.1, could not resolve peer react-dom@^18.3.1
        from react-dom@18.3.1

This takes the peer set together, which is the only shape that resolves,
and regenerates website/package-lock.json from scratch instead of editing
it. @types/react-dom is ^19.3.0, not ^19.3.1, which does not exist.

@docusaurus/core 3.10.2 declares react ^18.0.0 || ^19.0.0, so 19 is
inside the supported range. The @slorber/react-helmet-async alias it
depends on still advertises a peer range capped at react 18: that is a
warning, the install exits 0, and the build is clean.

Verified on Node 24.18.1 against main at 973801b:
  npm install            1409 packages, no ERESOLVE
  npm ci                 exit 0 on the regenerated lock
  npm run build          SUCCESS, static files generated

Refs IntersectMBO#403

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency

Projects

None yet

Development

Successfully merging this pull request may close these issues.

react 19: the Dependabot halves cannot resolve alone, so the bump needs one combined PR

1 participant