-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Add simplifyFileSize
option
#114
base: master
Are you sure you want to change the base?
Conversation
I added a new option to enable to show the files in B, MB, GB, TB, PB. Not sure if I need to divide the size by 1024 or 1000. Feedback will be appreciated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this proposal @KroshSputnik! Can you include tests and documentation?
Currently we support [email protected] so new ES6 syntax is not allowed:
|
Fixed the es6 issue of using `const`.
Updated readme about the new functionality
Hi @UlisesGascon I've added docs in readme and fixed the es6 issue. Thanks |
Created tests for the new `simplifyFileSize` option.
@UlisesGascon I have added test, for when the option is enabled and when it isnt. Can you double check my pull request. |
It looks great, although we could probably delegate that logic to bytes instead of handling it ourselves. |
Now using the package bytes, to convert.
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
@bjohansebas Updated the feature with your suggestion. |
Great! Once the tests are run, I'll be able to give my LGTM |
Added the decimal places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for include the tests and make the changes to support [email protected] @KroshSputnik! :)
I added some suggestions, I think that we will need to modify the HISTORY.md
to include the new dependency and the feature too 👍
simplifyFileSize
option
Supporting [email protected] versions. Co-authored-by: Ulises Gascón <[email protected]>
Added another check for default config. Co-authored-by: Ulises Gascón <[email protected]>
History about new simplifyFileSize feature and dependency of bytes.
@UlisesGascon All tasks completed. If need anything else, let me know. |
mmm.. not sure why one of the new tests is failing 🤔. Can you have a look @KroshSputnik ? |
I think the issues due to the differences of how linux and windows calculate bytes. I downgraded to node 0.8, but all tests pass successfully. |
I added a new option to enable to show the files sizes in B, MB, GB, TB, PB.
Enable it in the options by doing
'simplifyFileSize':true
Not sure if I need to divide the size by 1024 or 1000.
Also would I need to round the final size, as it seems the size returned for the file size is already rounded.
Feedback will be appreciated.