[PR #3831] [CLOSED] fix: ensure zod v4 type annotations work with core types #30634

Closed
opened 2026-04-17 21:40:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3831
Author: @Kinfe123
Created: 8/6/2025
Status: Closed

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


📝 Commits (7)

  • 375fff5 fix(org): use correct slug lookup when setting active org
  • e37e673 docs: adding reference to surrealdb adapter rewrite (#3754)
  • 2afdd69 chore(demo): replace isLoading using useTransition (#3775)
  • 669ce3e fix(reddit): refresh access token should use basic auth (#3753)
  • 1932d04 docs: unify component implementations for consistency (#3799)
  • 69d5239 fix: add missing team reference in teamMember schema (#3801)
  • 7d693ae fix: ensure zod v4 type annotations work with core types

📊 Changes

14 files changed (+168 additions, -155 deletions)

View changed files

.changeset/old-planets-camp.md (+5 -0)
📝 demo/nextjs/app/client-test/page.tsx (+19 -21)
📝 demo/nextjs/app/dashboard/user-card.tsx (+21 -19)
📝 demo/nextjs/app/features.tsx (+0 -22)
📝 demo/nextjs/components/sign-in.tsx (+11 -11)
📝 docs/app/docs/[[...slug]]/page.client.tsx (+5 -8)
📝 docs/components/generate-apple-jwt.tsx (+45 -42)
📝 docs/components/landing/section-svg.tsx (+8 -17)
📝 docs/content/docs/adapters/community-adapters.mdx (+1 -0)
📝 packages/better-auth/src/index.ts (+2 -0)
📝 packages/better-auth/src/plugins/organization/organization.test.ts (+19 -5)
📝 packages/better-auth/src/plugins/organization/organization.ts (+4 -0)
📝 packages/better-auth/src/plugins/organization/routes/crud-org.ts (+27 -10)
📝 packages/better-auth/src/social-providers/reddit.ts (+1 -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.


🔄 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/3831 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 8/6/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `fix/zod-v4-core-annotation` --- ### 📝 Commits (7) - [`375fff5`](https://github.com/better-auth/better-auth/commit/375fff5ac15b18b1e205c3cff6903a6ac609d2ec) fix(org): use correct slug lookup when setting active org - [`e37e673`](https://github.com/better-auth/better-auth/commit/e37e673e0417b2e8cbe0fc6b6f9b7932bc53b0b5) docs: adding reference to surrealdb adapter rewrite (#3754) - [`2afdd69`](https://github.com/better-auth/better-auth/commit/2afdd69e957564312fb1d3d2007ddcda07ccc3b5) chore(demo): replace isLoading using `useTransition` (#3775) - [`669ce3e`](https://github.com/better-auth/better-auth/commit/669ce3e6b737ce7c1a9ce982bf092f00d7373fbc) fix(reddit): refresh access token should use `basic` auth (#3753) - [`1932d04`](https://github.com/better-auth/better-auth/commit/1932d04c5a5be9180dab446e32b4ee1d5f788d24) docs: unify component implementations for consistency (#3799) - [`69d5239`](https://github.com/better-auth/better-auth/commit/69d5239e8f759966e84309743e5c3a5d41bce4b2) fix: add missing team reference in teamMember schema (#3801) - [`7d693ae`](https://github.com/better-auth/better-auth/commit/7d693ae6968dcc05e140632f831ab2bedfd06134) fix: ensure zod v4 type annotations work with core types ### 📊 Changes **14 files changed** (+168 additions, -155 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/old-planets-camp.md` (+5 -0) 📝 `demo/nextjs/app/client-test/page.tsx` (+19 -21) 📝 `demo/nextjs/app/dashboard/user-card.tsx` (+21 -19) 📝 `demo/nextjs/app/features.tsx` (+0 -22) 📝 `demo/nextjs/components/sign-in.tsx` (+11 -11) 📝 `docs/app/docs/[[...slug]]/page.client.tsx` (+5 -8) 📝 `docs/components/generate-apple-jwt.tsx` (+45 -42) 📝 `docs/components/landing/section-svg.tsx` (+8 -17) 📝 `docs/content/docs/adapters/community-adapters.mdx` (+1 -0) 📝 `packages/better-auth/src/index.ts` (+2 -0) 📝 `packages/better-auth/src/plugins/organization/organization.test.ts` (+19 -5) 📝 `packages/better-auth/src/plugins/organization/organization.ts` (+4 -0) 📝 `packages/better-auth/src/plugins/organization/routes/crud-org.ts` (+27 -10) 📝 `packages/better-auth/src/social-providers/reddit.ts` (+1 -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. --- <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 21:40:38 -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#30634