Skip to content
This repository has been archived by the owner on Jan 8, 2022. It is now read-only.

fix: replace ow with zod #58

Merged
merged 7 commits into from
Nov 30, 2021
Merged

fix: replace ow with zod #58

merged 7 commits into from
Nov 30, 2021

Conversation

Khasms
Copy link
Contributor

@Khasms Khasms commented Nov 24, 2021

Please describe the changes this PR makes and why it should be merged:
Replaces ow with zod.

Status and versioning classification:

  • Code changes have been tested, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating
  • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2021

Codecov Report

Merging #58 (1c0b8c7) into main (580a955) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #58   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           21        21           
  Lines          264       264           
  Branches        33        33           
=========================================
  Hits           264       264           
Impacted Files Coverage Δ
src/interactions/contextMenuCommands/Assertions.ts 100.00% <100.00%> (ø)
src/interactions/slashCommands/Assertions.ts 100.00% <100.00%> (ø)
...s/slashCommands/mixins/CommandChannelOptionBase.ts 100.00% <100.00%> (ø)
...ractions/slashCommands/mixins/CommandOptionBase.ts 100.00% <100.00%> (ø)
...s/slashCommands/mixins/CommandOptionWithChoices.ts 100.00% <100.00%> (ø)
src/messages/embed/Assertions.ts 100.00% <100.00%> (ø)
src/messages/embed/Embed.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 580a955...1c0b8c7. Read the comment docs.

@leonardssh
Copy link

Definitely zod is the best ♥ first validation scheme in my opinion. Also see: https://github.com/colinhacks/zod#comparison

@vladfrangu
Copy link
Member

Just like with #56, I'd love to know

  • What do errors look like
  • Does zod report all validation errors or just the first one

@Khasms
Copy link
Contributor Author

Khasms commented Nov 24, 2021

Just like with #56, I'd love to know

  • What do errors look like
  • Does zod report all validation errors or just the first one

The answers to both of those are in my comment on #56, #56 (comment)

src/interactions/slashCommands/Assertions.ts Outdated Show resolved Hide resolved
src/messages/embed/Assertions.ts Outdated Show resolved Hide resolved
Copy link
Member

@kyranet kyranet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just this one, everything else looks good to me

@Khasms Khasms requested a review from kyranet November 29, 2021 23:34
@iCrawl iCrawl merged commit 0b6fb81 into discordjs:main Nov 30, 2021
@Khasms Khasms deleted the zod branch November 30, 2021 20:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants