-
-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG]: drizzle-zod doesn't parse mysqlEnum
as z.ZodEnum
#3754
Comments
May I know the content of your tsconfig.json file? |
@L-Mario564, I rolled back to 0.5.1 for now, here's my tsconfig: {
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "./base.json",
"compilerOptions": {
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"noEmit": false,
"outDir": "${configDir}/dist"
}
} {
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true,
"target": "ESNext",
"lib": ["ESNext"],
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
"incremental": true,
"disableSourceOfProjectReferenceRedirect": true,
"tsBuildInfoFile": "${configDir}/.cache/tsbuildinfo.json",
"strict": true,
"noUncheckedIndexedAccess": true,
"checkJs": true,
"module": "Preserve",
"moduleResolution": "Bundler",
"noEmit": true
},
"exclude": ["node_modules", "build", "dist", ".next"]
} |
The same happens to me with pgEnum and text({enum:}) and varchar({enum:}). Drizzle zod translates it as an array of strings |
@nemanjastanic Is the sample code you provided is all that is required to reproduce the bug? I'm still completely unable to reproduce this. |
Hey @L-Mario564, I just retried this, it seems it's caused by #3732. I missed this previously because I managed to suppress the error by adding Please feel free to close this issue if you want to consider it a duplicate! |
@nemanjastanic Will close this in favor of the one you mentioned. Thanks. |
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.38.0
What version of
drizzle-kit
are you using?0.30.0
Other packages
[email protected]
Describe the Bug
The
enum
here should return az.ZodEnum
instead of az.ZodString
.It looks like just a TypeScript issue, it's done during runtime: column.ts#L57
It used to work in [email protected]
The text was updated successfully, but these errors were encountered: