Skip to content

chore(examples): bump @types/react to ~19.2.0 in React examples#2220

Merged
crutchcorn merged 4 commits into
TanStack:mainfrom
tsushanth:fix/example-react-types-19.2
Jul 9, 2026
Merged

chore(examples): bump @types/react to ~19.2.0 in React examples#2220
crutchcorn merged 4 commits into
TanStack:mainfrom
tsushanth:fix/example-react-types-19.2

Conversation

@tsushanth

@tsushanth tsushanth commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Closes #2216.

Why

npm install fails in every React example with an ERESOLVE peer-dependency conflict. The reporter @michaelboyles filed it against react/standard-schema but the same constraint exists across all 17 React examples:

  • Each example pins @types/react: ~19.1.0.
  • Each example also depends on @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 with npm view @types/react-dom@19.2.3 peerDependencies).

So the pinned ~19.1.0 (which only matches 19.1.x) can never satisfy the ^19.2.0 peer, and npm install bails out. npm install --legacy-peer-deps is the documented workaround but breaks pnpm install cleanness too.

What

Bumps @types/react from ~19.1.0 to ~19.2.0 across all 17 React examples. Runtime react / react-dom stay at 19.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).
  • Same fix applied to the other 16 examples for consistency since they have the identical version pin.

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-schema if you'd rather take the 16 others as a separate PR.

Summary by CodeRabbit

  • Chores
    • Updated React type definitions (@types/react) from ~19.1.0 to ~19.2.0 across React examples and related packages to stay aligned with the latest minor type updates.

`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
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f78d8ddd-52ad-4e21-acd3-588759227478

📥 Commits

Reviewing files that changed from the base of the PR and between 4593258 and c78c1da.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • packages/react-form-devtools/package.json
  • packages/react-form-nextjs/package.json
  • packages/react-form-remix/package.json
  • packages/react-form-start/package.json
  • packages/react-form/package.json
✅ Files skipped from review due to trivial changes (2)
  • packages/react-form-nextjs/package.json
  • packages/react-form-start/package.json

📝 Walkthrough

Walkthrough

The @types/react devDependency is bumped from ~19.1.0 to ~19.2.0 across React example and package manifests. No other dependencies, scripts, or manifest fields change.

Changes

@types/react version bump across React example and package manifests

Layer / File(s) Summary
@types/react ~19.1.0 → ~19.2.0
examples/react/array/package.json, examples/react/compiler/package.json, examples/react/composition/package.json, examples/react/devtools/package.json, examples/react/dynamic/package.json, examples/react/expo/package.json, examples/react/field-errors-from-form-validators/package.json, examples/react/large-form/package.json, examples/react/multi-step-wizard/package.json, examples/react/next-server-actions-zod/package.json, examples/react/next-server-actions/package.json, examples/react/query-integration/package.json, examples/react/remix/package.json, examples/react/simple/package.json, examples/react/standard-schema/package.json, examples/react/tanstack-start/package.json, examples/react/ui-libraries/package.json, packages/react-form-devtools/package.json, packages/react-form-nextjs/package.json, packages/react-form-remix/package.json, packages/react-form-start/package.json, packages/react-form/package.json
@types/react devDependency is updated from ~19.1.0 to ~19.2.0 in all changed manifests.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related issues

  • TanStack/form-v2#3: Directly updates @types/react in the same package.json manifests.

Possibly related PRs

  • TanStack/form#2167: Also changes the @types/react version in React example/package manifests.

Suggested reviewers: tannerlinsley

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is detailed, but it does not follow the required template and omits the Changes, Checklist, and Release Impact sections. Reformat the PR description to use the repo template, adding Changes, Checklist, and Release Impact sections with the required items.
Out of Scope Changes check ⚠️ Warning packages/react-form* were changed even though #2216 is about the React examples, so those manifest bumps appear unrelated to the issue. Remove or justify the packages/react-form* dependency bumps, or split them into a separate PR if they are intentionally unrelated.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly states the @types/react bump for React examples and matches the PR's main change.
Linked Issues check ✅ Passed The React example dependency bump addresses #2216 by moving @types/react to ~19.2.0, which resolves the reported peer conflict.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6a73479 and 4593258.

📒 Files selected for processing (17)
  • examples/react/array/package.json
  • examples/react/compiler/package.json
  • examples/react/composition/package.json
  • examples/react/devtools/package.json
  • examples/react/dynamic/package.json
  • examples/react/expo/package.json
  • examples/react/field-errors-from-form-validators/package.json
  • examples/react/large-form/package.json
  • examples/react/multi-step-wizard/package.json
  • examples/react/next-server-actions-zod/package.json
  • examples/react/next-server-actions/package.json
  • examples/react/query-integration/package.json
  • examples/react/remix/package.json
  • examples/react/simple/package.json
  • examples/react/standard-schema/package.json
  • examples/react/tanstack-start/package.json
  • examples/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",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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 -l

Repository: 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"
fi

Repository: 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.yaml

Repository: 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.

@tsushanth

Copy link
Copy Markdown
Contributor Author

Thanks @coderabbitai — regenerated pnpm-lock.yaml in a2ba154. All 17 React example slots now resolve against @types/react@~19.2.0; the 5 leftover ~19.1.0 specifiers are in the packages/react-form* packages themselves (outside this PR's scope).

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@tsushanth: Thanks for the update! The regenerated pnpm-lock.yaml looks good — all 17 example slots are now consistently pinned to ~19.2.0, and the residual ~19.1.0 entries in packages/react-form* are correctly scoped outside this PR. The fix is clean and minimal. 🐇 ✨


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@nx-cloud

nx-cloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit c78c1da

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 4m View ↗
nx run-many --target=build --exclude=examples/** ✅ Succeeded 38s View ↗

☁️ Nx Cloud last updated this comment at 2026-07-09 09:42:16 UTC

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​react@​19.2.171001007992100

View full report

@pkg-pr-new

pkg-pr-new Bot commented Jul 9, 2026

Copy link
Copy Markdown
More templates

@tanstack/angular-form

npm i https://pkg.pr.new/@tanstack/angular-form@2220

@tanstack/form-core

npm i https://pkg.pr.new/@tanstack/form-core@2220

@tanstack/form-devtools

npm i https://pkg.pr.new/@tanstack/form-devtools@2220

@tanstack/lit-form

npm i https://pkg.pr.new/@tanstack/lit-form@2220

@tanstack/preact-form

npm i https://pkg.pr.new/@tanstack/preact-form@2220

@tanstack/react-form

npm i https://pkg.pr.new/@tanstack/react-form@2220

@tanstack/react-form-devtools

npm i https://pkg.pr.new/@tanstack/react-form-devtools@2220

@tanstack/react-form-nextjs

npm i https://pkg.pr.new/@tanstack/react-form-nextjs@2220

@tanstack/react-form-remix

npm i https://pkg.pr.new/@tanstack/react-form-remix@2220

@tanstack/react-form-start

npm i https://pkg.pr.new/@tanstack/react-form-start@2220

@tanstack/solid-form

npm i https://pkg.pr.new/@tanstack/solid-form@2220

@tanstack/solid-form-devtools

npm i https://pkg.pr.new/@tanstack/solid-form-devtools@2220

@tanstack/svelte-form

npm i https://pkg.pr.new/@tanstack/svelte-form@2220

@tanstack/vue-form

npm i https://pkg.pr.new/@tanstack/vue-form@2220

commit: c78c1da

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.71%. Comparing base (6892ed0) to head (c78c1da).
⚠️ Report is 238 commits behind head on main.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@crutchcorn crutchcorn merged commit f066334 into TanStack:main Jul 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm install fails for react/standard-schema example

3 participants