chore(examples): bump @types/react to ~19.2.0 in React examples#2220
Conversation
`npm install` failed for the React examples (originally reported against react/standard-schema in TanStack#2216) because each example pinned `@types/react: ~19.1.0` while `@types/react-dom: ^19.0.3` resolves to 19.2.x — and `@types/react-dom@19.2.x` peer-requires `@types/react: ^19.2.0`. Same conflict in all 17 React examples. Bumps every React example's `@types/react` to `~19.2.0` so the dev-only type peer constraint is satisfied. `react`/`react-dom` themselves stay at 19.1.0; the types are forward-compatible within the same major. Closes TanStack#2216
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (2)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@examples/react/array/package.json`:
- Line 19: The package.json file has been updated to constrain `@types/react` to
~19.2.0, but the pnpm-lock.yaml file has not been regenerated to reflect this
new constraint and still contains the old specifier and resolved versions. Run
pnpm install to regenerate the pnpm-lock.yaml file so that it properly reflects
the updated `@types/react` constraint and resolves to the correct version across
all 17 React examples.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 16aaef4f-3050-42d9-b0b9-e9785a7c2184
📒 Files selected for processing (17)
examples/react/array/package.jsonexamples/react/compiler/package.jsonexamples/react/composition/package.jsonexamples/react/devtools/package.jsonexamples/react/dynamic/package.jsonexamples/react/expo/package.jsonexamples/react/field-errors-from-form-validators/package.jsonexamples/react/large-form/package.jsonexamples/react/multi-step-wizard/package.jsonexamples/react/next-server-actions-zod/package.jsonexamples/react/next-server-actions/package.jsonexamples/react/query-integration/package.jsonexamples/react/remix/package.jsonexamples/react/simple/package.jsonexamples/react/standard-schema/package.jsonexamples/react/tanstack-start/package.jsonexamples/react/ui-libraries/package.json
| "@tanstack/react-devtools": "^0.9.7", | ||
| "@tanstack/react-form-devtools": "^0.2.29", | ||
| "@types/react": "~19.1.0", | ||
| "@types/react": "~19.2.0", |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify all 17 React examples have `@types/react` bumped to ~19.2.0
# Search all React example package.json files for `@types/react` constraint
echo "Checking `@types/react` version across all React examples..."
fd -t f 'package\.json' examples/react --exec rg -H '`@types/react`.*19\.' {} \;
# Count how many files have the new constraint
echo ""
echo "Files with ~19.2.0:"
fd -t f 'package\.json' examples/react --exec grep -l '`@types/react`.*~19\.2\.0' {} \; | wc -l
echo "Files with old ~19.1.0 (should be 0):"
fd -t f 'package\.json' examples/react --exec grep -l '`@types/react`.*~19\.1\.0' {} \; | wc -lRepository: TanStack/form
Length of output: 2648
🏁 Script executed:
#!/bin/bash
# Check if pnpm-lock.yaml has been updated to reflect the new constraint
echo "Checking pnpm-lock.yaml for `@types/react` 19.2.x resolution..."
if [ -f "pnpm-lock.yaml" ]; then
# Look for resolved versions of `@types/react` that match 19.2.x
rg '`@types/react`@' pnpm-lock.yaml -A 2 | head -20
echo ""
echo "Count of 19.2.x resolutions:"
rg -o '`@types/react`.*?19\.2\.\d+' pnpm-lock.yaml | sort | uniq -c
else
echo "pnpm-lock.yaml not found"
fiRepository: TanStack/form
Length of output: 1171
🏁 Script executed:
#!/bin/bash
# More detailed check: search for `@types/react` version lines in pnpm-lock.yaml
echo "Searching for `@types/react` version resolutions..."
rg -A 1 "^\s*'`@types/react`':" pnpm-lock.yaml | head -30
echo ""
echo "Count of `@types/react`@19.1.17 (old version still in lock):"
rg -c '`@types/react`@19\.1\.17' pnpm-lock.yaml
echo ""
echo "Count of `@types/react`@19.2 (new version in lock):"
rg -c '`@types/react`@19\.2' pnpm-lock.yamlRepository: TanStack/form
Length of output: 742
Regenerate pnpm-lock.yaml — it has not been updated to reflect the new constraint.
The 17 React examples have been correctly updated to @types/react: ~19.2.0 in their package.json files, but the pnpm-lock.yaml file has not been regenerated. It still contains the old specifier (~19.1.0) and resolved version (@types/react@19.1.17, appearing 310 times). Without regenerating the lock file, installations will continue to resolve to 19.1.17 despite the package.json declaring 19.2.0. Run pnpm install to update pnpm-lock.yaml before this can merge.
🤖 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 `@examples/react/array/package.json` at line 19, The package.json file has been
updated to constrain `@types/react` to ~19.2.0, but the pnpm-lock.yaml file has
not been regenerated to reflect this new constraint and still contains the old
specifier and resolved versions. Run pnpm install to regenerate the
pnpm-lock.yaml file so that it properly reflects the updated `@types/react`
constraint and resolves to the correct version across all 17 React examples.
|
Thanks @coderabbitai — regenerated |
|
Tip For best results, initiate chat on the files or code changes.
If you found this review helpful, would you consider giving us a shout-out on X? Thank you for using CodeRabbit! |
|
View your CI Pipeline Execution ↗ for commit c78c1da
☁️ Nx Cloud last updated this comment at |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2220 +/- ##
==========================================
- Coverage 90.35% 89.71% -0.64%
==========================================
Files 38 65 +27
Lines 1752 3200 +1448
Branches 444 804 +360
==========================================
+ Hits 1583 2871 +1288
- Misses 149 295 +146
- Partials 20 34 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closes #2216.
Why
npm installfails in every React example with anERESOLVEpeer-dependency conflict. The reporter @michaelboyles filed it againstreact/standard-schemabut the same constraint exists across all 17 React examples:@types/react: ~19.1.0.@types/react-dom: ^19.0.3, which resolves to the latest 19.2.x (currently@types/react-dom@19.2.3).@types/react-dom@19.2.3's peer is@types/react: ^19.2.0(verified withnpm view @types/react-dom@19.2.3 peerDependencies).So the pinned
~19.1.0(which only matches19.1.x) can never satisfy the^19.2.0peer, andnpm installbails out.npm install --legacy-peer-depsis the documented workaround but breakspnpm installcleanness too.What
Bumps
@types/reactfrom~19.1.0to~19.2.0across all 17 React examples. Runtimereact/react-domstay at19.1.0— types are forward-compatible within the same major, so this is the minimal change that resolves the peer constraint without changing the demonstrated React version.@tanstack/react-devtools@latest's own peer is just@types/react: >=16.8, so it's not the source of the conflict and doesn't need touching.Test plan
cd examples/react/standard-schema && npm install— succeeds (verified locally; was the reporter's exact repro).Note
Found and analyzed during a sweep of the fresh issue queue. Single mechanical change so I just shipped the fix — happy to scope back to only
standard-schemaif you'd rather take the 16 others as a separate PR.Summary by CodeRabbit
@types/react) from~19.1.0to~19.2.0across React examples and related packages to stay aligned with the latest minor type updates.