[PR #5629] [MERGED] feat(core): replace ZodType with @standard-schema/spec #31726

Closed
opened 2026-04-17 22:36:50 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5629
Author: @himself65
Created: 10/28/2025
Status: Merged
Merged: 10/28/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/10/27/standard-schema


📝 Commits (1)

  • 3441f07 feat(core): replace ZodType with @standard-schema/spec

📊 Changes

4 files changed (+30 additions, -25 deletions)

View changed files

📝 packages/core/package.json (+1 -0)
📝 packages/core/src/db/type.ts (+3 -3)
📝 packages/core/src/types/index.ts (+1 -0)
📝 pnpm-lock.yaml (+25 -22)

📄 Description

Closes: https://github.com/better-auth/better-auth/pull/5570


Summary by cubic

Replaced ZodType with the StandardSchemaV1 interface from @standard-schema/spec in core validator types to standardize validation and decouple from Zod. Added @standard-schema/spec and re-exported StandardSchemaV1 from core.

  • Migration
    • Use StandardSchemaV1 for DBFieldAttributeConfig.validator input/output.
    • If you use Zod, wrap your schemas with a Standard Schema–compatible adapter or wrapper.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5629 **Author:** [@himself65](https://github.com/himself65) **Created:** 10/28/2025 **Status:** ✅ Merged **Merged:** 10/28/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/10/27/standard-schema` --- ### 📝 Commits (1) - [`3441f07`](https://github.com/better-auth/better-auth/commit/3441f07f45c3588bd4279c81d653ea31d78ff7e2) feat(core): replace ZodType with `@standard-schema/spec` ### 📊 Changes **4 files changed** (+30 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/package.json` (+1 -0) 📝 `packages/core/src/db/type.ts` (+3 -3) 📝 `packages/core/src/types/index.ts` (+1 -0) 📝 `pnpm-lock.yaml` (+25 -22) </details> ### 📄 Description Closes: https://github.com/better-auth/better-auth/pull/5570 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Replaced ZodType with the StandardSchemaV1 interface from @standard-schema/spec in core validator types to standardize validation and decouple from Zod. Added @standard-schema/spec and re-exported StandardSchemaV1 from core. - **Migration** - Use StandardSchemaV1 for DBFieldAttributeConfig.validator input/output. - If you use Zod, wrap your schemas with a Standard Schema–compatible adapter or wrapper. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 22:36:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#31726