SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 0 JavaScript

feat(eslint-plugin): add Zod v4 compatibility

Update Zod function schemas to use v4 API syntax:
- Replace z.function().args(z.string()) with z.function(z.tuple([z.string()]), z.any())
- Update moduleTypeProvider and flowTypeProvider in Environment.ts
- Allow both Zod v3 and v4 in package dependencies (^3.22.4 || ^4.0.0)

This fixes the crash when users have Zod v4 installed, where the
.args() method no longer exists. The new API is compatible with
both Zod v3.23+ and v4.x.

Fixes TypeError: zod.z.function(...).args is not a function
K
kolvian committed
45c23756d27a9be67fe2fabffccaacaa89ac2a5e
Parent: 0eebd37
Committed by Joe Savona <joesavona@fb.com> on 10/3/2025, 4:42:39 PM