Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changeset/react-types-optional-peer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@tanstack/react-form': patch
'@tanstack/react-form-devtools': patch
'@tanstack/react-form-nextjs': patch
'@tanstack/react-form-remix': patch
'@tanstack/react-form-start': patch
---

Declare `@types/react` as an optional peer dependency. The published type declarations import from `react`, so with install layouts where `@types/react` is not resolvable from the package's real path (such as pnpm's global virtual store), React types silently became `any`. Marking it optional keeps JavaScript consumers unaffected.
6 changes: 6 additions & 0 deletions packages/react-form-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@
"vite": "^7.2.2"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
}
6 changes: 6 additions & 0 deletions packages/react-form-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
"vite": "^7.2.2"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
}
6 changes: 6 additions & 0 deletions packages/react-form-remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
"vite": "^7.2.2"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
}
}
4 changes: 4 additions & 0 deletions packages/react-form-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@
},
"peerDependencies": {
"@tanstack/react-start": "^1.168.27",
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@tanstack/react-start": {
"optional": true
},
"@types/react": {
"optional": true
}
}
}
4 changes: 4 additions & 0 deletions packages/react-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,15 @@
"vitest-browser-react": "^2.3.0"
},
"peerDependencies": {
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
},
"peerDependenciesMeta": {
"@tanstack/react-start": {
"optional": true
},
"@types/react": {
"optional": true
}
}
}