All Posts
News bits
Zod v4.3.0: JSON Schema変換機能と排他的ユニオン型の追加
Zod v4.3.0 がリリース。 長年の要望であった z.fromJSONSchema() が追加され、JSON Schema から Zod スキーマへの変換が可能になった(OpenAPI 3.0 等に対応)。 また、正確に1つのオプションにマッチすることを要求する z.xor()(排他的ユニオン)や、部分的なレコードバリデーションを行う z.looseRecord()、undefined を許容しない exactOptional() などが追加されている。 ### 参考文献
Zod 4.1がCodecs APIを導入、双方向データ変換をサポート
Zod 4.1が新しいz.codec() APIを導入した。従来の.transform()が一方向のみだったのに対し、双方向変換を可能にし、型安全性と柔軟性を向上させた。
Zod 4 リリース
Zod 4 が安定版としてリリース。Zod 3 からの設計上の制約を解消し、パフォーマンスと型推論効率が大幅に向上。string/array/object のパースが最大 14 倍高速化し、TypeScript の型インスタンス生成も 100 分の 1 に削減。エラーカスタマイズ API が統一され、discriminatedUnion や literal の強化、refine や overwrite の改善など多くの新機能が追加。
Valibot v1: The 1 KB Schema Library
Valibot の v1 がリリースされました。
Standard Schema
Standard Schema は、バリデーションライブラリの仕様を統一するためのプロジェクトであり、TypeScript のバリデータライブラリである Zod、Valibot、ArkType などのメンテナが集まり仕様を設計している。
Write your own Zod
https://zackoverflow.dev/writing/write-your-own-zod/
Valibot, a < 1kb Zod Alternative
去年くらいからバリデータライブラリとして zod が話題です。
著者について
Hi there. I'm hrdtbs, a frontend expert and technical consultant. I started my career in the creative industry over 13 years ago, learning on the job as a 3DCG modeler and game engineer in the indie scene.
In 2015 I began working as a freelance web designer and engineer. I handled everything from design and development to operation and advertising, delivering comprehensive solutions for various clients.
In 2016 I joined Wemotion as CTO, where I built the engineering team from the ground up and led the development of core web and mobile applications for three years.
In 2019 I joined matsuri technologies as a Frontend Expert, and in 2020 I also began serving as a technical manager supporting streamers and content creators.
I'm so grateful to be working in this field, doing something that brings me so much joy. Thanks for stopping by.