fix: add optional @types/react peerDependency for pnpm#4077
fix: add optional @types/react peerDependency for pnpm#4077Hashim1999164 wants to merge 1 commit into
Conversation
Declare @types/react as an optional peer so TypeScript can resolve formik's React types under strict pnpm layouts without hoist. Fixes jaredpalmer#4063.
|
@Hashim1999164 is attempting to deploy a commit to the Formik Team on Vercel. A member of the Team first needs to authorize it. |
|
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Summary
@types/reactas an optional peer dependency so Formik's shipped.d.tsfiles resolve under strict pnpm (hoist: false).peerDependenciesMetaso JS-only consumers are not warned.Fixes #4063
Test plan
packages/formik/package.jsonlists@types/reactunderpeerDependenciesandpeerDependenciesMeta.optionalhoist: false, installingformik+@types/reactshould typecheck withoutTS2307forreact