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(errors): Add information about nested fields with errors #61

Merged
merged 8 commits into from
May 1, 2021

Conversation

typeofweb
Copy link
Member

Fixes #13

@vercel
Copy link

vercel bot commented Mar 24, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/typeofweb/typeofweb-schema/DSBdXszMTQGivjrF7ABEEvEPnho7
✅ Preview: https://typeofweb-schema-git-13-nested-errors-typeofweb.vercel.app

@codecov
Copy link

codecov bot commented Mar 24, 2021

Codecov Report

Merging #61 (90b29ee) into main (d9a610a) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##              main       #61   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines          285       295   +10     
  Branches        50        59    +9     
=========================================
+ Hits           285       295   +10     
Impacted Files Coverage Δ
src/modifiers/nullable.ts 100.00% <ø> (ø)
src/modifiers/optional.ts 100.00% <ø> (ø)
src/errors.ts 100.00% <100.00%> (ø)
src/modifiers/minArrayLength.ts 100.00% <100.00%> (ø)
src/modifiers/minStringLength.ts 100.00% <100.00%> (ø)
src/modifiers/nil.ts 100.00% <100.00%> (ø)
src/refine.ts 100.00% <100.00%> (ø)
src/stringify.ts 100.00% <100.00%> (ø)
src/validators/__validate.ts 100.00% <100.00%> (ø)
src/validators/array.ts 100.00% <100.00%> (ø)
... and 8 more

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 9dcd6bf...90b29ee. Read the comment docs.

@TypeofWebBot
Copy link

TypeofWebBot commented Mar 24, 2021

Bundle size comparison

 size comparison
browser
uncompressed 5.4 kB ▶️ +670 B (+14.17% 🔺)
gzipped 2.15 kB ▶️ +244 B (+12.80% 🔺)
main
uncompressed 5.29 kB ▶️ +670 B (+14.51% 🔺)
gzipped 2.07 kB ▶️ +242 B (+13.22% 🔺)
module
uncompressed 5.15 kB ▶️ +670 B (+14.95% 🔺)
gzipped 2.06 kB ▶️ +233 B (+12.75% 🔺)

Speed comparison

PR

library relative speed operations per second avg. operation time
@typeofweb/schema@pr-branch +4.75% (1,585,809 rps) (avg: 630ns)
@typeofweb/schema@base-branch 0% (1,513,892 rps) (avg: 660ns)
joi@17.4.0 -94.33% (85,785 rps) (avg: 11μs)
yup@0.32.9 -96.69% (50,096 rps) (avg: 19μs)
superstruct@0.14.2 -97.3% (40,944 rps) (avg: 24μs)
zod@3.0.0-alpha.24 -99.75% (3,826 rps) (avg: 261μs)

@typeofweb typeofweb marked this pull request as ready for review May 1, 2021 17:04
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.

Object and array validations should return all invalid fields instead of just the first one.
2 participants