shadcn@4.22.0

shadcn-ui/uishadcn@4.22.0Oct 16, 2026by github-actions[bot]

Upgrading?

AI Summary

Upgrades to Zod 4, requiring updates to type inference and error handling logic in consuming code.

Key Highlights

  • Upgrade to Zod 4
  • Use exported types (e.g., `RegistryItem`) instead of `z.infer`
  • Use schema methods (e.g., `registryItemSchema.array()`) instead of `z.array`
  • Error handling changes to expose `issues` instead of `errors`

Full Release Notes

### Minor Changes

- [#12298](https://github.com/shadcn-ui/ui/pull/12298) [`954ce95`](https://github.com/shadcn-ui/ui/commit/954ce953412867a57b7e067c076fa7fd395ea115) Thanks [@shadcn](https://github.com/shadcn)! - Upgrade to Zod 4. `shadcn/schema` and `@shadcn/registry/schema` now export Zod 4 schemas, so passing them to Zod 3's `z` no longer typechecks. On Zod 3, use the exported types (`RegistryItem`, `RegistryItemFile`, `Config`) and the schema's own methods (`registryItemSchema.array()`) instead of `z.infer` and `z.array`. Zod errors expose `issues`, not `errors`. Validation messages now use Zod 4's wording.

### Patch Changes

- Updated dependencies [[`954ce95`](https://github.com/shadcn-ui/ui/commit/954ce953412867a57b7e067c076fa7fd395ea115)]:
  - @shadcn/registry@0.2.0

Related Repositories