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(pack): add pack-gzip-level #6406
feat(pack): add pack-gzip-level #6406
Conversation
This options allows specifying custom compression level. Underlying node implementation enforces correct number ranges, but silently ignores `NaN`, so we explicitly check that provided value is valid. fix pnpm#6393
💖 Thanks for opening this pull request! 💖 |
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 think you forgot to pass that option here:
https://github.com/pnpm/pnpm/pull/6406/files#diff-c518d24f9667ad9a2c03aaa643610621010dcfb05670c326948311d7088bab10R115
EDIT: fixed
21b5e8d
to
feb3254
Compare
Congrats on merging your first pull request! 🎉🎉🎉 |
Thanks a bunch for your help. |
@@ -30,6 +30,9 @@ export function rcOptionsTypes () { | |||
export function cliOptionsTypes () { | |||
return { | |||
'pack-destination': String, | |||
...pick([ | |||
'pack-gzip-level', |
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.
Consider also adding this to help()
below so it shows up in pnpm pack --help
for discoverability?
This options allows specifying custom compression level.
Underlying node implementation enforces correct number ranges,
but silently ignores
NaN
, so we explicitly check that provided value is valid.More information about this
level
option can be found in node docs and zlib specs.Supported values are (
6
is default in node):I didn't add any test but I tested manually
that compressing with
-1
,0
and1
create an installable package.Also tested manually that using
pnpm config set pack-gzip-level 0
and--pack-gzip-level=0
both work as expected.fix #6393