From e2099b90024ea082eb83951b4a71b349cb4cf9fd Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Sat, 4 Jul 2026 19:27:24 +0200 Subject: [PATCH] refactor(auth): replace z.enum with plain TS union; drop zod dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AuthProvider was the only zod usage in the package — a z.enum solely to infer a type. Replace with a plain union type and remove zod from packages/auth/package.json dependencies. Claude-Session: https://claude.ai/code/session_012Bnvt1MghwHj4qQRxuQUGa --- packages/auth/package.json | 3 +-- packages/auth/src/types.ts | 6 ++---- pnpm-lock.yaml | 3 --- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/auth/package.json b/packages/auth/package.json index c8e499876..e348601d0 100644 --- a/packages/auth/package.json +++ b/packages/auth/package.json @@ -28,8 +28,7 @@ "better-auth": "1.6.23", "drizzle-orm": "1.0.0-rc.4", "jose": "^6.2.3", - "react": "^19.2.7", - "zod": "^4.4.3" + "react": "^19.2.7" }, "devDependencies": { "@reactive-resume/config": "workspace:*", diff --git a/packages/auth/src/types.ts b/packages/auth/src/types.ts index 2d5bc5454..e5d6e9ee3 100644 --- a/packages/auth/src/types.ts +++ b/packages/auth/src/types.ts @@ -1,11 +1,9 @@ import type { auth } from "./config"; -import z from "zod"; export type AuthSession = { session: typeof auth.$Infer.Session.session; user: typeof auth.$Infer.Session.user; }; -const authProviderSchema = z.enum(["credential", "passkey", "google", "github", "linkedin", "custom"]); - -export type AuthProvider = z.infer; +// ponytail: plain union replaces z.enum solely used for type inference +export type AuthProvider = "credential" | "passkey" | "google" | "github" | "linkedin" | "custom"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 480c19691..3c4618524 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -706,9 +706,6 @@ importers: react: specifier: ^19.2.7 version: 19.2.7 - zod: - specifier: ^4.4.3 - version: 4.4.3 devDependencies: '@reactive-resume/config': specifier: workspace:*