feat(napi/minify): expose join_vars, sequences, and max_iterations options#14545
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. This stack of pull requests is managed by Graphite. Learn more about stacking. |
3ba2ae0 to
b43e59e
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR exposes three minification options (join_vars, sequences, and passes) in the NAPI minify interface to provide more granular control over the compression behavior. The change replaces hardcoded values with configurable options that can be passed from JavaScript.
- Adds three new optional fields to CompressOptions struct with proper documentation
- Updates the TryFrom implementation to use the new configurable options instead of hardcoded values
- Maps the JavaScript-friendly "passes" parameter to the internal "max_iterations" field
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
dd4d65d to
1e05baa
Compare
Merge activity
|
…tions (#14545) related to rolldown/rolldown#6477 I use `passes` instead of `max_iterations` since `passes` is commonly used in the Javascript community, see - terser: https://github.com/terser/terser#:~:text=passes%20(default%3A%201)%20%2D%2D%20The%20maximum%20number%20of%20times%20to%20run%20compress.%20In%20some%20cases%20more%20than%20one%20pass%20leads%20to%20further%20compressed%20code.%20Keep%20in%20mind%20more%20passes%20will%20take%20more%20time. - swc: <img width="626" height="828" alt="image" src="https://github.com/user-attachments/assets/aabc2e10-59a1-43ab-b9e0-52ab35522f85" />
1e05baa to
c19c9ec
Compare

related to rolldown/rolldown#6477
I use
passesinstead ofmax_iterationssincepassesis commonly used in the Javascript community,see