-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
deps: remove byte-size #3569
deps: remove byte-size #3569
Conversation
fe34c93
to
db0073e
Compare
NOTE even pretty-bytes will soon not work in node10 so we may need to just implement this ourselves: sindresorhus/pretty-bytes#68 |
db0073e
to
06a3450
Compare
Seems like it might be better to just stay on v7 of byte-size in the meantime. |
The thing we're balancing this against is having outdated packages in the tree, we already have two that have pending reasons why they can't be updated at this time and every time the list is added to it becomes harder to manage. We're trying to be pretty aggressive on this front. |
Understood, but it seems like adopting a package that is explicitly planning to be nonviable within the next 5 months is just hiding/punting the tech debt and difficulty, not reducing it. |
Yes this is absolutely a calculated tech debt punting decision. |
06a3450
to
f35c9f2
Compare
Rewrote this with @fritzy's help to just be the absolute minimum functionality we need, we're not using an entire formatting library here we're just translating a very small section of file size values. |
@@ -28,8 +28,8 @@ const logTar = (tarball, opts = {}) => { | |||
{ name: 'name:', value: tarball.name }, | |||
{ name: 'version:', value: tarball.version }, | |||
tarball.filename && { name: 'filename:', value: tarball.filename }, | |||
{ name: 'package size:', value: byteSize(tarball.size) }, | |||
{ name: 'unpacked size:', value: byteSize(tarball.unpackedSize) }, | |||
{ name: 'package size:', value: formatBytes(tarball.size) }, |
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.
I don't think these are actually used anywhere because byteSize would be returning an object here not a string.
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.
LGTM!
In its latest release, byte-size dropped support for node versions lower than 14. The cli currently supports node 10 and up. The actual functionality we needed and was using was extremely limited in scope, and didn't warrant an external module. It's just pretty printing a file size, and the files we are dealing with are limited in size so we don't need to support so many suffixes. PR-URL: #3569 Credit: @wraithgar Close: #3569 Reviewed-by: @isaacs
f35c9f2
to
a1bdbea
Compare
In its latest release, byte-size dropped support for node versions lower
than 14. The cli currently supports node 10 and up.
The actual functionality we needed and was using was extremely limited
in scope, and didn't warrant an external module. It's just pretty
printing a file size, and the files we are dealing with are limited in
size so we don't need to support so many suffixes.