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: lazy validator #147

Merged
merged 8 commits into from
Jul 9, 2022
Merged

feat: lazy validator #147

merged 8 commits into from
Jul 9, 2022

Conversation

imranbarbhuiya
Copy link
Contributor

@imranbarbhuiya imranbarbhuiya commented Jul 6, 2022

@codecov-commenter
Copy link

codecov-commenter commented Jul 6, 2022

Codecov Report

Merging #147 (4221e94) into main (f5375af) will decrease coverage by 0.14%.
The diff coverage is 79.31%.

❗ Current head 4221e94 differs from pull request most recent head deb3902. Consider uploading reports for the commit deb3902 to get more accurate results

@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
- Coverage   99.26%   99.12%   -0.15%     
==========================================
  Files          53       55       +2     
  Lines        3137     3203      +66     
  Branches      777      791      +14     
==========================================
+ Hits         3114     3175      +61     
- Misses         13       18       +5     
  Partials       10       10              
Impacted Files Coverage Δ
src/validators/LazyValidator.ts 75.00% <75.00%> (ø)
src/lib/Shapes.ts 100.00% <100.00%> (ø)
src/constraints/util/net.ts 100.00% <0.00%> (ø)
src/validators/BaseValidator.ts 100.00% <0.00%> (+0.90%) ⬆️

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 f5375af...deb3902. Read the comment docs.

@vladfrangu
Copy link
Member

Can you also try

const obj = s.object({
	id: s.string,
	items: s.lazy(() => obj)
});

? Does this work?

@imranbarbhuiya
Copy link
Contributor Author

missing github reporter in vitest xD

favna
favna previously approved these changes Jul 6, 2022
favna
favna previously approved these changes Jul 6, 2022
src/validators/LazyValidator.ts Outdated Show resolved Hide resolved
favna
favna previously approved these changes Jul 7, 2022
vladfrangu
vladfrangu previously approved these changes Jul 7, 2022
@imranbarbhuiya imranbarbhuiya dismissed stale reviews from vladfrangu and favna via c5bfd85 July 7, 2022 09:54
tests/validators/lazy.test.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.

Hi, that's me doing this again, sorry not sorry.

tests/validators/lazy.test.ts Outdated Show resolved Hide resolved
tests/validators/lazy.test.ts Outdated Show resolved Hide resolved
@imranbarbhuiya imranbarbhuiya requested a review from kyranet July 7, 2022 10:54
@favna favna merged commit 807666e into sapphiredev:main Jul 9, 2022
@imranbarbhuiya imranbarbhuiya deleted the feat/lazy branch July 9, 2022 14:07
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.

5 participants