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.
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
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.