Skip to content
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(mangler): support keep_names option #9898

Open
wants to merge 1 commit into
base: 03-19-feat_mangler_collect_symbols_that_is_used_to_set_name_property
Choose a base branch
from

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Mar 19, 2025

Same with #9873, but built on top of #9897.

close #9873
close #9711

Copy link
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added A-minifier Area - Minifier C-enhancement Category - New feature or request labels Mar 19, 2025
@sapphi-red sapphi-red marked this pull request as ready for review March 19, 2025 13:54
@sapphi-red sapphi-red force-pushed the 03-19-feat_mangler_support_keep_names_option branch from 445a32b to d32678a Compare March 19, 2025 13:56
Copy link

codspeed-hq bot commented Mar 19, 2025

CodSpeed Performance Report

Merging #9898 will not alter performance

Comparing 03-19-feat_mangler_support_keep_names_option (d32678a) with 03-19-feat_mangler_collect_symbols_that_is_used_to_set_name_property (95f70a0)

Summary

✅ 33 untouched benchmarks

let collector = NameSymbolCollector::new(scoping, ast_nodes);
#[derive(Debug, Clone, Copy, Default)]
pub struct MangleOptionsKeepNames {
/// Keep function names so that `Function.prototype.name` is preserved.
Copy link
Contributor

@overlookmotel overlookmotel Mar 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is comment is exactly descriptive. It's not a property of Function.prototype, but a property of the Function instance. "name property" might be a better description.

Ditto Class.prototype.name comment below.

Sorry to be a pedant!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-minifier Area - Minifier C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants