Repository navigation
chore(deps): Replace filesize with DIY function - #2589
Merged
Merged
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
34 of 37 tasks
@wxt-dev/analytics
@wxt-dev/auto-icons
@wxt-dev/browser
@wxt-dev/i18n
@wxt-dev/is-background
@wxt-dev/module-react
@wxt-dev/module-solid
@wxt-dev/module-svelte
@wxt-dev/module-vue
@wxt-dev/runner
@wxt-dev/storage
@wxt-dev/unocss
@wxt-dev/webextension-polyfill
wxt
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2589 +/- ##
==========================================
+ Coverage 79.42% 79.52% +0.09%
==========================================
Files 134 134
Lines 4000 4004 +4
Branches 927 929 +2
==========================================
+ Hits 3177 3184 +7
+ Misses 730 727 -3
Partials 93 93 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
aklinker1
marked this pull request as ready for review
August 8, 2026 17:25
aklinker1
commented
Aug 8, 2026
|
|
||
| export function getBytesDisplay(bytes: number): string { | ||
| if (bytes < 1000) return `${bytes} B`; | ||
| if (bytes < 999995) return `${(bytes / 1e3).toFixed(2)} kB`; |
Member
Author
There was a problem hiding this comment.
Using standard scientific notation for file size, not the base 2 one. So 1 kilobytes (kB) = 1000 bytes, not 1 kibibyte (KiB) = 1024 bytes.
aklinker1
commented
Aug 8, 2026
Comment on lines
+49
to
+50
| if (bytes < 1000) return `${bytes} B`; | ||
| if (bytes < 999995) return `${(bytes / 1e3).toFixed(2)} kB`; |
Member
Author
There was a problem hiding this comment.
Using an odd cutoff here so 999,999 bytes is displayed as 1 MB instead of 1000 kB, given how toFixed works. See tests for founding and unit behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
58 kB → 178 B
Manual Testing
Related Issue
Apart of #2523