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

feat: allow alternatives to zod #1029

Open
jpgilchrist opened this issue Apr 12, 2024 · 0 comments
Open

feat: allow alternatives to zod #1029

jpgilchrist opened this issue Apr 12, 2024 · 0 comments

Comments

@jpgilchrist
Copy link

Is your feature request related to a problem? Please describe.

There are a lot of great schema validators out there and each have there pros and cons. However, forcing the trigger.dev user into using only one specific package is restrictive and doesn't necessarily fit into every project's configuration. For instance, if I prefer the yup library and already have a bunch of my schemas defined with yup, then I do not want to duplicate those in zod as well.

There is also an issue with resolving peer dependencies on zod that can cause TS infinite loops due to schema parsing when zod is not the same version. To solve this, a simple "resolutions" block in package.json can be used.

Describe the solution you'd like to see

I'd like to see a solution similar to @hookform/resolvers
so that more than one validator library could be used.

Describe alternate solutions

N/A

Additional information

No response

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

No branches or pull requests

1 participant