package
Official codemod for converting Zod schemas to Valibot
npm install @valibot/zod-to-valibotGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Official codemod for automatically converting Zod schemas to Valibot schemas.
npx @valibot/zod-to-valibot src/**/*# Dry run (preview changes)
npx @valibot/zod-to-valibot --dry src/**/*
# Verbose output
npx @valibot/zod-to-valibot --verbose=2 src/**/*
# Use a different parser (default is --parser=ts)
npx @valibot/zod-to-valibot --parser=babel src/**/*
# Use different extensions (default is --extensions=ts,tsx,js,jsx)
npx @valibot/zod-to-valibot --extensions=ts src/**/*For all available options, see jscodeshift documentation.
The codemod converts Zod schemas to Valibot, including:
string, number, boolean, date, bigint)email, min, max, etc.)z.coerce.* → v.pipe(v.unknown(), v.toX()))For issues or questions, open an issue on the Valibot repository.
Estimated unpacked size across 53 packages.
8.9 MB
Includes dependencies.