Aalexbit-codemod

valibot_migrate_to_v0_31_0

Migrate your app to Valibot v0.31.0

breaking-changeupgradevalibot
Public
2 downloads
1 stars
How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

This codemod automatically migrates your Valibot codebase to version 0.31.0, handling all breaking changes introduced in this release.

What it migrates

  • Schema renames: customcheck, InputInferInput, OutputInferOutput
  • Object merging: mergeobject
  • Objects/tuples with rest: Transforms objectWithRest and tupleWithRest to new syntax
  • Loose/strict variants: Converts looseObject/strictObject and looseTuple/strictTuple to new API
  • Pipeline API: Migrates array-based pipelines to pipe() function calls
  • Method transformations: Updates coerce, flatten, brand, and transform method calls
  • Nested pipes: Flattens deeply nested schema compositions into cleaner pipe() chains

Example

Before (v0.30):

typescript

After (v0.31):

typescript

License

MIT

Ready to contribute?

Build your own codemod and share it with the community.