Skip to content
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

[Validators] Export BuildSchema type and simplify JSON schema #3944

Merged
merged 4 commits into from
Jan 23, 2025

Conversation

L-Mario564
Copy link
Collaborator

Addresses #3732 & #3869.
Branched off of #3852.

Fixed the The inferred type of X cannot be named without a reference to ../../../../../node_modules/drizzle-zod/schema.types.internal.mjs error for all validator packages. Using @slimshreydy's reproduction repo, I managed to fix it by going into node_modules and exporting BuildSchema type. This PR exports this so you don't have to manually do what was described prior.

Breaking for some users
Depending on the tsconfig.json, it seems that recursive types causes some issues. The only recursive type in these packages is the default JSON schema. I've simplified the definition to make it more accessible. Most developers override this field anyways, but it is important to note this change.

@AndriiSherman AndriiSherman merged commit 0cd20b6 into drizzle-team:beta Jan 23, 2025
0 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants