refactor(auth): replace z.enum with plain TS union; drop zod dependency

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
This commit is contained in:
Amruth Pillai
2026-07-04 19:27:24 +02:00
parent 5762eb6a3e
commit e2099b9002
3 changed files with 3 additions and 9 deletions
+1 -2
View File
@@ -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:*",
+2 -4
View File
@@ -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<typeof authProviderSchema>;
// ponytail: plain union replaces z.enum solely used for type inference
export type AuthProvider = "credential" | "passkey" | "google" | "github" | "linkedin" | "custom";
-3
View File
@@ -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:*