-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use a library for type validation #3
Comments
while doing the type validation ourselves isn't the greatest, adding zod isn't something i want to do. zod doesn't publish to jsr (yet, see colinhacks/zod#3506) so the only option would be to depend on the node package. i also dislike that idea, as adding zod as a dependency would increase the minified + gzipped size of this package by 5x. i really don't want to depend on external packages other than the eventemitter used, so unless there's a reason to use zod that would make the extra size worth it, id really rather not. |
Would Valibot be an option then? |
I still have concerns about bundle size since one of my main goals is to have as few dependencies as possible for this project. The only dependency we have right now is our eventemitter, and that’s because I don’t think we should reimplement that. I’ll reopen this, but this isn’t coming until after the first stable release. |
I mean, according to their website the package is only 600 bytes... |
https://github.com/meower-media-co/api-client/blob/b009f8f3f17aa3860cb64cc1c2f7269b196f8d37/src/interfaces/post.ts#L75
https://github.com/meower-media-co/api-client/blob/b009f8f3f17aa3860cb64cc1c2f7269b196f8d37/src/interfaces/user.ts#L62
The text was updated successfully, but these errors were encountered: