Skip to content

feat(minifier): remove name from function / class expressions#8997

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-09-feat_minifier_remove_name_from_function___class_expressions
Feb 10, 2025
Merged

feat(minifier): remove name from function / class expressions#8997
graphite-app[bot] merged 1 commit intomainfrom
02-09-feat_minifier_remove_name_from_function___class_expressions

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Feb 10, 2025

Removes names from function / class expressions if it's not used as a identifier. This changes the name property, but it should be fine to enable this by default as the mangler also does not preserve that.
esbuild, SWC, terser all removes this by default.

Copy link
Member Author

sapphi-red commented Feb 10, 2025


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.

@sapphi-red sapphi-red marked this pull request as ready for review February 10, 2025 06:03
@github-actions github-actions bot added A-minifier Area - Minifier C-enhancement Category - New feature or request labels Feb 10, 2025
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Feb 10, 2025
Copy link
Member

Boshen commented Feb 10, 2025

Merge activity

  • Feb 10, 1:17 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 10, 1:22 AM EST: A user added this pull request to the Graphite merge queue.
  • Feb 10, 1:47 AM EST: A user merged this pull request with the Graphite merge queue.

Removes `name`s from function / class expressions if it's not used as a identifier. This changes the `name` property, but it should be fine to enable this by default as the mangler also does not preserve that.
esbuild, SWC, terser all removes this by default.
@graphite-app graphite-app bot force-pushed the 02-10-feat_minifier_remove_unused_class_expression_by_remove_dead_code branch from 685222e to 3f7faed Compare February 10, 2025 06:22
@graphite-app graphite-app bot force-pushed the 02-09-feat_minifier_remove_name_from_function___class_expressions branch from 671da06 to ce3b744 Compare February 10, 2025 06:23
Base automatically changed from 02-10-feat_minifier_remove_unused_class_expression_by_remove_dead_code to main February 10, 2025 06:40
@graphite-app graphite-app bot merged commit ce3b744 into main Feb 10, 2025
27 checks passed
@graphite-app graphite-app bot deleted the 02-09-feat_minifier_remove_name_from_function___class_expressions branch February 10, 2025 06:47
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 10, 2025

CodSpeed Performance Report

Merging #8997 will not alter performance

Comparing 02-09-feat_minifier_remove_name_from_function___class_expressions (ce3b744) with main (d515cfd)

Summary

✅ 33 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue 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