[PR #4593] [MERGED] fix: normalize zod imports #13715

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4593
Author: @gabrielmar
Created: 9/11/2025
Status: Merged
Merged: 9/11/2025
Merged by: @himself65

Base: canaryHead: style/normalize-zod-imports


📝 Commits (1)

  • 353aedc style: normalize zod imports

📊 Changes

55 files changed (+70 additions, -70 deletions)

View changed files

📝 packages/better-auth/src/api/call.test.ts (+1 -1)
📝 packages/better-auth/src/api/middlewares/origin-check.test.ts (+1 -1)
📝 packages/better-auth/src/api/routes/account.ts (+1 -1)
📝 packages/better-auth/src/api/routes/callback.ts (+1 -1)
📝 packages/better-auth/src/api/routes/email-verification.ts (+1 -1)
📝 packages/better-auth/src/api/routes/reset-password.ts (+1 -1)
📝 packages/better-auth/src/api/routes/session.ts (+1 -1)
📝 packages/better-auth/src/api/routes/sign-in.ts (+1 -1)
📝 packages/better-auth/src/api/routes/sign-up.ts (+1 -1)
📝 packages/better-auth/src/api/routes/update-user.ts (+1 -1)
📝 packages/better-auth/src/api/to-auth-endpoints.test.ts (+1 -1)
📝 packages/better-auth/src/client/test-plugin.ts (+1 -1)
📝 packages/better-auth/src/db/field.ts (+1 -1)
📝 packages/better-auth/src/db/schema.ts (+1 -1)
📝 packages/better-auth/src/db/to-zod.ts (+2 -2)
📝 packages/better-auth/src/oauth2/state.ts (+1 -1)
📝 packages/better-auth/src/plugins/admin/admin.ts (+1 -1)
📝 packages/better-auth/src/plugins/api-key/routes/create-api-key.ts (+1 -1)
📝 packages/better-auth/src/plugins/api-key/routes/delete-api-key.ts (+1 -1)
📝 packages/better-auth/src/plugins/api-key/routes/get-api-key.ts (+1 -1)

...and 35 more files

📄 Description

Summary by cubic

Standardized Zod imports across the repo by replacing all "zod/v4" and mixed default/named imports with a single pattern: import * as z from "zod" (and type-only imports from "zod"). This removes subpath imports that can break bundlers and keeps types consistent, with no behavior changes.

  • Refactors
    • Replaced all "zod/v4" imports with "zod" in src, plugins, and tests.
    • Updated OpenAPI generator to use z.ZodType, z.ZodObject, and z.ZodOptional.
    • Normalized default Zod imports to namespace form.

🔄 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/4593 **Author:** [@gabrielmar](https://github.com/gabrielmar) **Created:** 9/11/2025 **Status:** ✅ Merged **Merged:** 9/11/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `style/normalize-zod-imports` --- ### 📝 Commits (1) - [`353aedc`](https://github.com/better-auth/better-auth/commit/353aedc7f73b193f3b18676681158eac9db0f219) style: normalize zod imports ### 📊 Changes **55 files changed** (+70 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/api/call.test.ts` (+1 -1) 📝 `packages/better-auth/src/api/middlewares/origin-check.test.ts` (+1 -1) 📝 `packages/better-auth/src/api/routes/account.ts` (+1 -1) 📝 `packages/better-auth/src/api/routes/callback.ts` (+1 -1) 📝 `packages/better-auth/src/api/routes/email-verification.ts` (+1 -1) 📝 `packages/better-auth/src/api/routes/reset-password.ts` (+1 -1) 📝 `packages/better-auth/src/api/routes/session.ts` (+1 -1) 📝 `packages/better-auth/src/api/routes/sign-in.ts` (+1 -1) 📝 `packages/better-auth/src/api/routes/sign-up.ts` (+1 -1) 📝 `packages/better-auth/src/api/routes/update-user.ts` (+1 -1) 📝 `packages/better-auth/src/api/to-auth-endpoints.test.ts` (+1 -1) 📝 `packages/better-auth/src/client/test-plugin.ts` (+1 -1) 📝 `packages/better-auth/src/db/field.ts` (+1 -1) 📝 `packages/better-auth/src/db/schema.ts` (+1 -1) 📝 `packages/better-auth/src/db/to-zod.ts` (+2 -2) 📝 `packages/better-auth/src/oauth2/state.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/admin/admin.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/create-api-key.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/delete-api-key.ts` (+1 -1) 📝 `packages/better-auth/src/plugins/api-key/routes/get-api-key.ts` (+1 -1) _...and 35 more files_ </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Standardized Zod imports across the repo by replacing all "zod/v4" and mixed default/named imports with a single pattern: import * as z from "zod" (and type-only imports from "zod"). This removes subpath imports that can break bundlers and keeps types consistent, with no behavior changes. - **Refactors** - Replaced all "zod/v4" imports with "zod" in src, plugins, and tests. - Updated OpenAPI generator to use z.ZodType, z.ZodObject, and z.ZodOptional. - Normalized default Zod imports to namespace form. <!-- 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:05:58 -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#13715