Skip to content

feat(minifier): fold ({ ...!0 }) into ({})#12935

Merged
graphite-app[bot] merged 1 commit intomainfrom
08-09-feat_minifier_fold_._0_into_
Aug 9, 2025
Merged

feat(minifier): fold ({ ...!0 }) into ({})#12935
graphite-app[bot] merged 1 commit intomainfrom
08-09-feat_minifier_fold_._0_into_

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Aug 9, 2025

No description provided.

Copilot AI review requested due to automatic review settings August 9, 2025 13:01
@github-actions github-actions bot added A-minifier Area - Minifier C-enhancement Category - New feature or request labels Aug 9, 2025
Copy link
Member Author

Boshen commented Aug 9, 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the minifier's ability to fold object spread operations by expanding the detection of expressions that can be safely removed from spread operations. The change consolidates the logic for determining when spread elements should be folded and extends support to include evaluated expressions that resolve to non-string values.

  • Refactored spread element folding logic into a reusable helper function
  • Extended folding support to expressions that evaluate to non-string values without side effects
  • Added test coverage for logical NOT operations (!0 and !1)

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 9, 2025

CodSpeed Instrumentation Performance Report

Merging #12935 will not alter performance

Comparing 08-09-feat_minifier_fold_.0_into (2c303f5) with main (9c5a377)1

Summary

✅ 34 untouched benchmarks

Footnotes

  1. No successful run was found on main (df68910) during the generation of this report, so 9c5a377 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Aug 9, 2025
Copy link
Member Author

Boshen commented Aug 9, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 08-09-feat_minifier_fold_._0_into_ branch from 5f43357 to 2c303f5 Compare August 9, 2025 13:43
@graphite-app graphite-app bot merged commit 2c303f5 into main Aug 9, 2025
30 checks passed
@graphite-app graphite-app bot deleted the 08-09-feat_minifier_fold_._0_into_ branch August 9, 2025 13:48
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 9, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Aug 12, 2025
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