dillon1000/react

Commit

[compiler] Update for Zod v3/v4 compatibility (#34717)

Partial redo of #34710. The changes there tried to use `z.function(args,
return)` to be compatible across Zod v3 and v4, but Zod 4's function API
has completely changed. Instead, I've updated to just use `z.any()`
where we expect a function, and manually validate that it's a function
before we call the value. We already have validation of the return type
(also using Zod).

Co-authored-by: kolvian <[email protected]>
Browse files
Changed paths8 files
First-parent comparison
M compiler/packages/babel-plugin-react-compiler/package.json ModifiedM compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/__tests__/envConfig-test.ts ModifiedM compiler/packages/eslint-plugin-react-compiler/package.json ModifiedM compiler/packages/react-compiler-healthcheck/package.json ModifiedM compiler/packages/react-mcp-server/package.json ModifiedM compiler/yarn.lock ModifiedM packages/eslint-plugin-react-hooks/package.json Modified
Patch

Files changed

Rendering syntax-highlighted changes…