fix: use human-readable byte sizes in upgrade verbose output#866
Merged
Conversation
- Replace raw byte counts (e.g. '3435689 bytes') with formatted values (e.g. '3.4MB') using existing formatCompactWithUnit utility - Change 'Downloaded binary verified' to 'Binary verified' since the message applies to both delta-patched and downloaded binaries - Replace manual KB formatting with formatCompactWithUnit for consistency
Contributor
|
Contributor
Codecov Results 📊✅ 6213 passed | Total: 6213 | Pass Rate: 100% | Execution Time: 0ms 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ❌ Patch coverage is 39.13%. Project has 13578 uncovered lines. Files with missing lines (3)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 75.92% 75.10% -0.82%
==========================================
Files 293 293 —
Lines 53930 54528 +598
Branches 0 0 —
==========================================
+ Hits 40941 40950 +9
- Misses 12989 13578 +589
- Partials 0 0 —Generated by Codecov Action |
…otation Sentry bot correctly identified that formatCompactWithUnit(n, 'byte') produces '1.1BB' for gigabyte values because Intl.NumberFormat compact uses 'B' for billions and appendUnitSuffix adds another 'B' for bytes. Add a dedicated formatBytes() that uses proper 1024-based binary units (B, KB, MB, GB) instead of piggybacking on count formatting.
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.
Summary
3435689 bytes) with formatted values (e.g.3.4MB) using existingformatCompactWithUnitutilityformatCompactWithUnitfor consistencyBefore
After