mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-11 21:45:04 +10:00
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:
@@ -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:*",
|
||||
|
||||
@@ -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";
|
||||
|
||||
Generated
-3
@@ -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:*
|
||||
|
||||
Reference in New Issue
Block a user