-
-
Notifications
You must be signed in to change notification settings - Fork 714
fix(napi/minify): handle boolean values for compress.unused option
#14513
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
fix(napi/minify): handle boolean values for compress.unused option
#14513
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
compress.unused optioncompress.unused option
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.
Pull Request Overview
This PR fixes the compress.unused option in the NAPI minify binding to properly handle boolean values alongside the existing string option. The change allows users to pass true/false boolean values in addition to the string "keep_assign".
- Updated the TypeScript type annotation from
"true | false | 'keep_assign'"to"boolean | 'keep_assign'" - Changed the field type from
Option<String>toOption<Either<bool, String>>to support both boolean and string values - Implemented proper pattern matching logic to handle boolean values and map them to the appropriate enum variants
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
c93aa2f to
df5926c
Compare
sapphi-red
left a comment
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.
Thank you!
Merge activity
You must have a Graphite account in order to use the merge queue. Create an account and try again using this link |
fixes #14512
Fixes the
compress.unusedoption implemented in PR #11796 to properly accept boolean values from the napi binding.