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(minifier): merge single var declarations without init into for-in #8812

Conversation

sapphi-red
Copy link
Contributor

@sapphi-red sapphi-red commented Jan 31, 2025

Compress var a; for (a in b) c into for (var a in b) c. This is possible because var a can be put in any place within the same scope. This is only possible with var.

Copy link
Contributor Author

sapphi-red commented Jan 31, 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.

@github-actions github-actions bot added A-minifier Area - Minifier C-enhancement Category - New feature or request labels Jan 31, 2025
@sapphi-red sapphi-red force-pushed the 01-31-feat_minifier_merge_expressions_in_for-in_statement_head branch from de38ca3 to 486f86e Compare January 31, 2025 12:16
@sapphi-red sapphi-red force-pushed the 01-31-feat_minifier_merge_single_var_declarations_without_init_into_for-in branch from cde10ba to 633fe4d Compare January 31, 2025 12:16
@sapphi-red sapphi-red marked this pull request as ready for review January 31, 2025 12:24
Copy link

codspeed-hq bot commented Jan 31, 2025

CodSpeed Performance Report

Merging #8812 will not alter performance

Comparing 01-31-feat_minifier_merge_single_var_declarations_without_init_into_for-in (99b47ed) with main (adb8ebd)

Summary

✅ 33 untouched benchmarks

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jan 31, 2025
Copy link

graphite-app bot commented Jan 31, 2025

Merge activity

@graphite-app graphite-app bot added 0-merge Merge with Graphite Merge Queue and removed 0-merge Merge with Graphite Merge Queue labels Jan 31, 2025
#8812)

Compress `var a; for (a in b) c` into `for (var a in b) c`. This is possible because `var a` can be put in any place within the same scope. This is only possible with `var`.
@graphite-app graphite-app bot force-pushed the 01-31-feat_minifier_merge_expressions_in_for-in_statement_head branch from 486f86e to d9f1d0d Compare January 31, 2025 15:31
@graphite-app graphite-app bot force-pushed the 01-31-feat_minifier_merge_single_var_declarations_without_init_into_for-in branch from 633fe4d to 99b47ed Compare January 31, 2025 15:32
graphite-app bot pushed a commit that referenced this pull request Jan 31, 2025
Base automatically changed from 01-31-feat_minifier_merge_expressions_in_for-in_statement_head to main January 31, 2025 15:37
@graphite-app graphite-app bot merged commit 99b47ed into main Jan 31, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 01-31-feat_minifier_merge_single_var_declarations_without_init_into_for-in branch January 31, 2025 15:47
@oxc-bot oxc-bot mentioned this pull request Feb 2, 2025
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.

1 participant