Bump react and @types/react#23
Conversation
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) and [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react). These dependencies needed to be updated together. Updates `react` from 18.3.1 to 19.2.6 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v19.2.6/packages/react) Updates `@types/react` from 18.3.3 to 19.2.15 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: react dependency-version: 19.2.6 dependency-type: direct:production update-type: version-update:semver-major - dependency-name: "@types/react" dependency-version: 19.2.15 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughReact and related type dependencies are upgraded from version 18 to version 19 across the project. The root ChangesReact Dependency Upgrade
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Around line 27-28: Package.json lists "react": "19.2.6" but "react-dom":
"18.3.1", causing a major-version mismatch; update the react-dom dependency to a
React 19 release that matches (e.g., "react-dom": "19.2.6" or a caret range ^19)
and reinstall with exact versions (follow the guideline: npm install
--save-exact react@^19 react-dom@^19) so both "react" and "react-dom" entries
are the same major version.
In `@web/package.json`:
- Around line 13-14: The package.json has mismatched major versions for React
("react": "19.2.6") and react-dom ("react-dom": "18.3.1"); update react-dom to a
19.x exact version to match React (e.g., set "react-dom" to "19.2.6" or run the
command from guidelines: npm install --save-exact react@^19 react-dom@^19) so
both "react" and "react-dom" share the same major version.
- Line 19: Update the `@types/react-dom` dependency in package.json from "18.3.0"
to a v19 range to match `@types/react`@19 and React 19 (e.g., change
"`@types/react-dom`" to "^19"); then run the exact install command from the
guideline (npm install --save-exact `@types/react`@^19 `@types/react-dom`@^19) and
commit the updated package.json and lockfile so type definitions and CI type
checks align with React 19.
- Around line 10-21: The package.json dependency versions are mismatched:
"react" is at 19.2.6 while "react-dom" remains at 18.3.1; update the "react-dom"
entry to the corresponding React 19 version (e.g., "react-dom": "19.2.6") in the
dependencies block, then run install and re-run checks for React 19 changes (ref
callback return values and useRef() call signatures) across the codebase to
ensure compatibility with the upgraded "react" and "react-dom" versions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 3c7910b4-5c37-41f4-b823-4675db05e791
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
package.jsonweb/package.json
📜 Review details
🔇 Additional comments (1)
web/package.json (1)
12-12: 🏗️ Heavy liftRemove React 19 compatibility concern for Next.js 16.2.6.
Next.js 16.2.6 is compatible with React 19 (Next.js docs reference App Router using React canary releases with stable React 19 changes, and the v16.2.0 release line tracks React upgrade work). The remaining check is mainly to ensure
react/react-domversions inweb/package.jsonalign with React 19 for tooling/runtime expectations.
| "react": "19.2.6", | ||
| "react-dom": "18.3.1" |
There was a problem hiding this comment.
Critical: react-dom must be upgraded to match React 19.
React and react-dom must be kept at the same major version. The upgrade guide explicitly requires installing both together. Having React at 19.2.6 while react-dom remains at 18.3.1 will cause runtime incompatibilities and unpredictable behavior.
🔧 Required fix
"react": "19.2.6",
- "react-dom": "18.3.1"
+ "react-dom": "19.2.6"As per coding guidelines: "Install: npm install --save-exact react@^19 react-dom@^19"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "react": "19.2.6", | |
| "react-dom": "18.3.1" | |
| "react": "19.2.6", | |
| "react-dom": "19.2.6" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` around lines 27 - 28, Package.json lists "react": "19.2.6" but
"react-dom": "18.3.1", causing a major-version mismatch; update the react-dom
dependency to a React 19 release that matches (e.g., "react-dom": "19.2.6" or a
caret range ^19) and reinstall with exact versions (follow the guideline: npm
install --save-exact react@^19 react-dom@^19) so both "react" and "react-dom"
entries are the same major version.
| "dependencies": { | ||
| "@vercel/analytics": "^2.0.1", | ||
| "next": "16.2.6", | ||
| "react": "18.3.1", | ||
| "react": "19.2.6", | ||
| "react-dom": "18.3.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "20.11.17", | ||
| "@types/react": "18.3.3", | ||
| "@types/react": "19.2.15", | ||
| "@types/react-dom": "18.3.0", | ||
| "typescript": "5.4.5" | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check for removed/deprecated React APIs in the web directory
echo "=== Checking for propTypes usage ==="
rg -n --type=ts --type=tsx --type=js --type=jsx -C2 '\bpropTypes\s*=' web/
echo "=== Checking for string refs ==="
rg -n --type=ts --type=tsx --type=js --type=jsx -C2 'ref\s*=\s*["\']' web/
echo "=== Checking for legacy Context APIs ==="
rg -n --type=ts --type=tsx --type=js --type=jsx -C2 '\b(contextTypes|getChildContext)\b' web/
echo "=== Checking for ReactDOM.render usage ==="
rg -n --type=ts --type=tsx --type=js --type=jsx -C2 'ReactDOM\.(render|hydrate|unmountComponentAtNode)' web/
echo "=== Checking for findDOMNode usage ==="
rg -n --type=ts --type=tsx --type=js --type=jsx -C2 '\bfindDOMNode\b' web/
echo "=== Checking for createFactory usage ==="
rg -n --type=ts --type=tsx --type=js --type=jsx -C2 '\bcreateFactory\b' web/Repository: p-to-q/aleph
Length of output: 355
🌐 Web query:
What codemods are recommended for upgrading to React 19?
💡 Result:
Recommended React 19 upgrade codemods (run via the official codemod CLI): 1) Run the full React 19 “migration recipe” (recommended for most projects) - Command: npx codemod@latest react/19/migration-recipe [1] - This runs the React 19 codemods included in the recipe: replace-reactdom-render, replace-string-ref, replace-act-import, replace-use-form-state, and prop-types-typescript [1]. 2) TypeScript-focused types migration (separate preset) - The React team also provides types-react-codemod to migrate “most type related breaking changes” for React 19 [1]. - Command shown in the upgrade guide: npx types-react-codemod@latest preset-19./path-... [1]. 3) Individual codemods (if you prefer running one-by-one) They are available in the react-codemod repository and can be run with npx codemod react/19/ --target [2]. The recipe codemods include: - react/19/replace-reactdom-render [2] - react/19/replace-string-ref [2] - react/19/replace-act-import [2] - react/19/replace-use-form-state [2] (Other codemods exist in the repo as well, but the upgrade guide’s recipe above is the “recommended” starting point.) [1][2]
Citations:
- 1: https://react.dev/blog/2024/04/25/react-19-upgrade-guide
- 2: https://github.com/reactjs/react-codemod
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== File types in web/ (quick check) ==="
ls -1 web | head -n 50 || true
GLOBS=( -g '*.ts' -g '*.tsx' -g '*.js' -g '*.jsx' )
run_search () {
local label="$1"; shift
echo "=== $label ==="
# shellcheck disable=SC2068
rg -n -C2 "$@" web "${GLOBS[@]}" --max-count 50 || echo "(no matches)"
echo
}
run_search "propTypes usage (function components)" '\bpropTypes\s*='
run_search "defaultProps usage" '\bdefaultProps\s*='
run_search "string refs (ref=\"...\" / ref='...')" 'ref\s*=\s*["'\'']'
run_search "legacy Context APIs (contextTypes/getChildContext)" '\b(contextTypes|getChildContext)\b'
run_search "ReactDOM.(render|hydrate|unmountComponentAtNode)" 'ReactDOM\.(render|hydrate|unmountComponentAtNode)'
run_search "findDOMNode usage" '\bfindDOMNode\b'
run_search "createFactory usage" '\bcreateFactory\b'
echo "=== createRoot usage (for ReactDOM.render replacement) ==="
rg -n -C2 'createRoot\s*\(' web "${GLOBS[@]}" --max-count 50 || echo "(no matches)"
echo
echo "=== Error handling / deprecated ref callback returns (heuristic) ==="
# Look for common bad pattern: ref={(...) => { return ... }} (heuristic only)
rg -n -C2 'ref\s*=\s*\{\s*\(?[A-Za-z0-9_,\s]*\)?\s*=>\s*\{\s*return\b' web "${GLOBS[@]}" --max-count 50 || echo "(no heuristic matches)"
echo
echo "=== Look for codemod/migration-recipe evidence in repo ==="
rg -n --max-count 50 'codemod@latest|react/19/migration-recipe|types-react-codemod|preset-19|replace-reactdom-render|replace-string-ref' . || echo "(no matches)"Repository: p-to-q/aleph
Length of output: 806
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "=== web/package.json (lines 1-80) ==="
cat -n web/package.json | sed -n '1,80p'
echo
echo "=== Grep for codemod/migration references in web/ ==="
rg -n --max-count 50 'codemod@latest|react/19/migration-recipe|types-react-codemod|migration-recipe|preset-19|replace-reactdom-render|replace-string-ref' web/ || echo "(no matches)"Repository: p-to-q/aleph
Length of output: 760
React 19 upgrade: deprecated API usage looks absent, but react-dom is still on v18
- In
web/, no occurrences ofpropTypes/defaultPropsfor function components, string refs (ref="..."), legacy context (contextTypes/getChildContext),ReactDOM.render(...),findDOMNode, orcreateFactory. web/package.jsonusesreact@19.2.6withreact-dom@18.3.1; upgradereact-domto React 19 and re-check React 19 ref/type changes (e.g., ref callback return values anduseRef()call signatures).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/package.json` around lines 10 - 21, The package.json dependency versions
are mismatched: "react" is at 19.2.6 while "react-dom" remains at 18.3.1; update
the "react-dom" entry to the corresponding React 19 version (e.g., "react-dom":
"19.2.6") in the dependencies block, then run install and re-run checks for
React 19 changes (ref callback return values and useRef() call signatures)
across the codebase to ensure compatibility with the upgraded "react" and
"react-dom" versions.
| "react": "19.2.6", | ||
| "react-dom": "18.3.1" |
There was a problem hiding this comment.
Critical: react-dom must be upgraded to match React 19.
React and react-dom must be kept at the same major version. Having React at 19.2.6 while react-dom remains at 18.3.1 will cause runtime incompatibilities.
🔧 Required fix
"react": "19.2.6",
- "react-dom": "18.3.1"
+ "react-dom": "19.2.6"As per coding guidelines: "Install: npm install --save-exact react@^19 react-dom@^19"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "react": "19.2.6", | |
| "react-dom": "18.3.1" | |
| "react": "19.2.6", | |
| "react-dom": "19.2.6" |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/package.json` around lines 13 - 14, The package.json has mismatched major
versions for React ("react": "19.2.6") and react-dom ("react-dom": "18.3.1");
update react-dom to a 19.x exact version to match React (e.g., set "react-dom"
to "19.2.6" or run the command from guidelines: npm install --save-exact
react@^19 react-dom@^19) so both "react" and "react-dom" share the same major
version.
| "@types/node": "20.11.17", | ||
| "@types/react": "18.3.3", | ||
| "@types/react": "19.2.15", | ||
| "@types/react-dom": "18.3.0", |
There was a problem hiding this comment.
Major: @types/react-dom should be upgraded to match React 19.
The TypeScript type definitions for react-dom should be upgraded to version ^19 to match the upgraded @types/react at 19.2.15 and the target React version 19.2.6.
🔧 Recommended fix
"`@types/react`": "19.2.15",
- "`@types/react-dom`": "18.3.0",
+ "`@types/react-dom`": "19.3.0",As per coding guidelines: "Update TypeScript types: npm install --save-exact @types/react@^19 @types/react-dom@^19"
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| "@types/react-dom": "18.3.0", | |
| "`@types/react-dom`": "19.3.0", |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@web/package.json` at line 19, Update the `@types/react-dom` dependency in
package.json from "18.3.0" to a v19 range to match `@types/react`@19 and React 19
(e.g., change "`@types/react-dom`" to "^19"); then run the exact install command
from the guideline (npm install --save-exact `@types/react`@^19
`@types/react-dom`@^19) and commit the updated package.json and lockfile so type
definitions and CI type checks align with React 19.
Bumps react and @types/react. These dependencies needed to be updated together.
Updates
reactfrom 18.3.1 to 19.2.6Release notes
Sourced from react's releases.
... (truncated)
Changelog
Sourced from react's changelog.
... (truncated)
Commits
eaf3e95Version 19.2.623f4f9f19.2.590ab3f8Version 19.2.4612e371Version 19.2.3b910fc1Version 19.2.2053df4eVersion 19.2.15667a41Bump next prerelease version numbers (#34639)8bb7241Bump useEffectEvent to Canary (#34610)e3c9656Ensure Performance Track are Clamped and Don't overlap (#34509)68f00c9Release Activity in Canary (#34374)Updates
@types/reactfrom 18.3.3 to 19.2.15Commits
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)