-
Notifications
You must be signed in to change notification settings - Fork 0
Bump react and @types/react #23
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -10,12 +10,12 @@ | |||||||||
| "dependencies": { | ||||||||||
| "@vercel/analytics": "^2.0.1", | ||||||||||
| "next": "16.2.6", | ||||||||||
| "react": "18.3.1", | ||||||||||
| "react": "19.2.6", | ||||||||||
| "react-dom": "18.3.1" | ||||||||||
|
Comment on lines
+13
to
14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| }, | ||||||||||
| "devDependencies": { | ||||||||||
| "@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. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Major: The TypeScript type definitions for react-dom should be upgraded to version ^19 to match the upgraded 🔧 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 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| "typescript": "5.4.5" | ||||||||||
| } | ||||||||||
|
Comment on lines
10
to
21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 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:
💡 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:
🏁 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
🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
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.
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
As per coding guidelines: "Install: npm install --save-exact react@^19 react-dom@^19"
📝 Committable suggestion
🤖 Prompt for AI Agents