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: add maxFileSize validation rule #198

Merged
merged 4 commits into from
Jan 20, 2023
Merged

feat: add maxFileSize validation rule #198

merged 4 commits into from
Jan 20, 2023

Conversation

brc-dd
Copy link
Member

@brc-dd brc-dd commented Jan 19, 2023

fixes #197

@netlify
Copy link

netlify bot commented Jan 19, 2023

Deploy Preview for sefirot-docs ready!

Name Link
🔨 Latest commit 624e459
🔍 Latest deploy log https://app.netlify.com/sites/sefirot-docs/deploys/63ca24bb8283540009678722
😎 Deploy Preview https://deploy-preview-198--sefirot-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jan 19, 2023

Deploy Preview for sefirot-story ready!

Name Link
🔨 Latest commit 624e459
🔍 Latest deploy log https://app.netlify.com/sites/sefirot-story/deploys/63ca24bb3a27ed00089f96db
😎 Deploy Preview https://deploy-preview-198--sefirot-story.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov
Copy link

codecov bot commented Jan 19, 2023

Codecov Report

Base: 45.87% // Head: 46.04% // Increases project coverage by +0.17% 🎉

Coverage data is based on head (624e459) compared to base (9981849).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #198      +/-   ##
==========================================
+ Coverage   45.87%   46.04%   +0.17%     
==========================================
  Files         103      105       +2     
  Lines        8159     8185      +26     
  Branches      302      316      +14     
==========================================
+ Hits         3743     3769      +26     
  Misses       4416     4416              
Impacted Files Coverage Δ
lib/validation/rules/index.ts 100.00% <100.00%> (ø)
lib/validation/rules/maxFileSize.ts 100.00% <100.00%> (ø)
lib/validation/validators/maxFileSize.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@kiaking kiaking left a comment

Choose a reason for hiding this comment

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

Looking good! Can we have test for this? 👀

@brc-dd
Copy link
Member Author

brc-dd commented Jan 20, 2023

This won't work with decimal in size, do you want to process that too? Also, it won't work with IEC units (KiB, MiB ... power of 2**10).

@kiaking
Copy link
Member

kiaking commented Jan 20, 2023

Nah that's fine! I think for now we only need KB, MB and such 👍

Copy link
Member

@kiaking kiaking left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@kiaking kiaking merged commit 7b80d92 into main Jan 20, 2023
@kiaking kiaking deleted the fix/197 branch January 20, 2023 06:17
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.

Add maxFileSize validation rule
2 participants