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
refactor: use zod in builders #10117
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10117 +/- ##
==========================================
- Coverage 62.19% 59.38% -2.81%
==========================================
Files 209 244 +35
Lines 16316 17108 +792
Branches 1214 1250 +36
==========================================
+ Hits 10148 10160 +12
- Misses 6123 6903 +780
Partials 45 45
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this needs a rebase
Builders used to use Zod but there were many many complaints about it. That was after /builders initially used the I can reason this is related to confusing errors (the actual linked issue is a duplicate). I very strongly recommend you instead contribute to Shapeshift by fulfilling this issue for which most work is already finished in this pr and only unit tests need to be updated. Once that issue is resolved custom messages can be assigned in /builders and get very clear errors. Also relevant: |
This has all already been discussed in internals, albeit rather scattered, see: there's probably more if you search for "shapeshift". |
Copying my message from Discord to here after reading that conversation:
Adding to it, technically I could finish that PR in a couple of days if I really sit down and just finish it. I've just been lacking the motivation to do so. Once it's finished though, adding custom messages is a singe. |
Please describe the changes this PR makes and why it should be merged:
Replaces
shapeshift
withzod
andzod-validation-error
in@discordjs/builders
.Closes #9468.
Status and versioning classification: