[PR #4909] [CLOSED] [revert]chore: no need backport for zod 3 #13898

Closed
opened 2026-04-13 09:12:04 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4909
Author: @himself65
Created: 9/25/2025
Status: Closed

Base: canaryHead: himself65/2025/09/25/zod


📝 Commits (4)

📊 Changes

38 files changed (+1374 additions, -723 deletions)

View changed files

📝 packages/better-auth/src/api/routes/account.ts (+35 -18)
📝 packages/better-auth/src/api/routes/email-verification.ts (+12 -7)
📝 packages/better-auth/src/api/routes/reset-password.ts (+26 -16)
📝 packages/better-auth/src/api/routes/session.ts (+10 -5)
📝 packages/better-auth/src/api/routes/sign-in.ts (+55 -23)
📝 packages/better-auth/src/api/routes/sign-up.ts (+1 -1)
📝 packages/better-auth/src/api/routes/update-user.ts (+39 -15)
📝 packages/better-auth/src/plugins/admin/admin.ts (+123 -64)
📝 packages/better-auth/src/plugins/api-key/routes/create-api-key.ts (+38 -21)
📝 packages/better-auth/src/plugins/api-key/routes/delete-api-key.ts (+3 -1)
📝 packages/better-auth/src/plugins/api-key/routes/get-api-key.ts (+3 -1)
📝 packages/better-auth/src/plugins/api-key/routes/update-api-key.ts (+48 -18)
📝 packages/better-auth/src/plugins/api-key/routes/verify-api-key.ts (+6 -2)
📝 packages/better-auth/src/plugins/custom-session/index.ts (+7 -4)
📝 packages/better-auth/src/plugins/device-authorization/index.ts (+48 -26)
📝 packages/better-auth/src/plugins/email-otp/index.ts (+57 -17)
📝 packages/better-auth/src/plugins/generic-oauth/index.ts (+50 -23)
📝 packages/better-auth/src/plugins/magic-link/index.ts (+31 -17)
📝 packages/better-auth/src/plugins/multi-session/index.ts (+6 -4)
📝 packages/better-auth/src/plugins/oauth-proxy/index.ts (+6 -4)

...and 18 more files

📄 Description

Summary by cubic

Restores Zod v3 syntax across Better Auth, plugins, SSO, and Stripe so schemas use meta() and z.email(), improving OpenAPI metadata while keeping API behavior the same. Removes the need to backport Zod v3 changes.

  • Refactors
    • Replaced .describe() with .meta({ description }) in all request/query schemas.
    • Switched z.string().email() to z.email().
    • Polished schema metadata (examples, required flags, defaults) for clearer docs.
    • No endpoint or runtime behavior changes; validations and outputs remain consistent.

🔄 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/4909 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/25/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `himself65/2025/09/25/zod` --- ### 📝 Commits (4) - [`8db6337`](https://github.com/better-auth/better-auth/commit/8db633767766efecd6d063eaba30def55c0acd97) Revert "chore: use zod v3 syntax (#4864)" - [`c38677f`](https://github.com/better-auth/better-auth/commit/c38677f53574c1c3c20423fbce444c94e59d2055) Revert "chore: use zod v3 syntax (#4860)" - [`de2df06`](https://github.com/better-auth/better-auth/commit/de2df065021589314e3120e4b401c733c414b462) Revert "chore: use zod v3 syntax (#4851)" - [`c969962`](https://github.com/better-auth/better-auth/commit/c9699626a99bb34f3be78702d3513212b0777b06) Merge branch 'canary' into himself65/2025/09/25/zod ### 📊 Changes **38 files changed** (+1374 additions, -723 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/routes/account.ts` (+35 -18) 📝 `packages/better-auth/src/api/routes/email-verification.ts` (+12 -7) 📝 `packages/better-auth/src/api/routes/reset-password.ts` (+26 -16) 📝 `packages/better-auth/src/api/routes/session.ts` (+10 -5) 📝 `packages/better-auth/src/api/routes/sign-in.ts` (+55 -23) 📝 `packages/better-auth/src/api/routes/sign-up.ts` (+1 -1) 📝 `packages/better-auth/src/api/routes/update-user.ts` (+39 -15) 📝 `packages/better-auth/src/plugins/admin/admin.ts` (+123 -64) 📝 `packages/better-auth/src/plugins/api-key/routes/create-api-key.ts` (+38 -21) 📝 `packages/better-auth/src/plugins/api-key/routes/delete-api-key.ts` (+3 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/get-api-key.ts` (+3 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/update-api-key.ts` (+48 -18) 📝 `packages/better-auth/src/plugins/api-key/routes/verify-api-key.ts` (+6 -2) 📝 `packages/better-auth/src/plugins/custom-session/index.ts` (+7 -4) 📝 `packages/better-auth/src/plugins/device-authorization/index.ts` (+48 -26) 📝 `packages/better-auth/src/plugins/email-otp/index.ts` (+57 -17) 📝 `packages/better-auth/src/plugins/generic-oauth/index.ts` (+50 -23) 📝 `packages/better-auth/src/plugins/magic-link/index.ts` (+31 -17) 📝 `packages/better-auth/src/plugins/multi-session/index.ts` (+6 -4) 📝 `packages/better-auth/src/plugins/oauth-proxy/index.ts` (+6 -4) _...and 18 more files_ </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Restores Zod v3 syntax across Better Auth, plugins, SSO, and Stripe so schemas use meta() and z.email(), improving OpenAPI metadata while keeping API behavior the same. Removes the need to backport Zod v3 changes. - **Refactors** - Replaced .describe() with .meta({ description }) in all request/query schemas. - Switched z.string().email() to z.email(). - Polished schema metadata (examples, required flags, defaults) for clearer docs. - No endpoint or runtime behavior changes; validations and outputs remain consistent. <!-- 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-13 09:12:04 -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#13898