[PR #3834] [MERGED] fix: ensure zod v4 type annotations work with core types #5036

Closed
opened 2026-03-13 12:08:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3834
Author: @Kinfe123
Created: 8/6/2025
Status: Merged
Merged: 8/6/2025
Merged by: @Bekacru

Base: canaryHead: fix/zod-v4-core-annotation-issues


📝 Commits (2)

  • eefc681 fix: ensure zod v4 type annotations work with core types
  • 5a4d219 chore: lint

📊 Changes

1 file changed (+2 additions, -0 deletions)

View changed files

📝 packages/better-auth/src/index.ts (+2 -0)

📄 Description

We need to keep both zod/v4 and zod/v4/core exports to ensure type annotations work correctly with Zod v4. This will solve making it hard for typescript to figure out the annotation due to internal module export conflict. you can run -

npx tsc --declaration --declarationMap

which checks for tsc and other unnecessary leaks as well.


🔄 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/3834 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 8/6/2025 **Status:** ✅ Merged **Merged:** 8/6/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/zod-v4-core-annotation-issues` --- ### 📝 Commits (2) - [`eefc681`](https://github.com/better-auth/better-auth/commit/eefc6816fab37e8281aeb32f86a0ef60722e92b2) fix: ensure zod v4 type annotations work with core types - [`5a4d219`](https://github.com/better-auth/better-auth/commit/5a4d219c901f80bd781a554a34c3bdadfffdb6e1) chore: lint ### 📊 Changes **1 file changed** (+2 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/index.ts` (+2 -0) </details> ### 📄 Description We need to keep both zod/v4 and zod/v4/core exports to ensure type annotations work correctly with Zod v4. This will solve making it hard for typescript to figure out the annotation due to internal module export conflict. you can run - ``` npx tsc --declaration --declarationMap ``` which checks for tsc and other unnecessary leaks as well. --- <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-03-13 12:08:49 -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#5036