Skip to content

feat(minifier): compress if (foo, !!bar) to if (foo, bar)#10164

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-01-feat_minifier_compress_if_foo_bar_to_if_foo_bar_
Apr 2, 2025
Merged

feat(minifier): compress if (foo, !!bar) to if (foo, bar)#10164
graphite-app[bot] merged 1 commit intomainfrom
04-01-feat_minifier_compress_if_foo_bar_to_if_foo_bar_

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Apr 1, 2025

if (foo, !!bar) can be compressed to if (foo, bar) because the last value is used as a boolean.

Copy link
Member Author

sapphi-red commented Apr 1, 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 Apr 1, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 1, 2025

CodSpeed Instrumentation Performance Report

Merging #10164 will not alter performance

Comparing 04-01-feat_minifier_compress_if_foo_bar_to_if_foo_bar_ (bc5411d) with main (395b545)

Summary

✅ 36 untouched benchmarks

@sapphi-red sapphi-red changed the base branch from 04-01-feat_minifier_compress_foo_true_into_foo_1_ to graphite-base/10164 April 1, 2025 11:19
@sapphi-red sapphi-red force-pushed the 04-01-feat_minifier_compress_if_foo_bar_to_if_foo_bar_ branch from 006f8bf to 4616725 Compare April 1, 2025 11:24
@sapphi-red sapphi-red force-pushed the graphite-base/10164 branch from d64b22d to 0282325 Compare April 1, 2025 11:24
@sapphi-red sapphi-red changed the base branch from graphite-base/10164 to 04-01-feat_minifier_compress_foo_true_into_foo_1_ April 1, 2025 11:24
@sapphi-red sapphi-red marked this pull request as ready for review April 1, 2025 11:25
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Apr 1, 2025
Copy link
Member

Boshen commented Apr 1, 2025

Merge activity

@sapphi-red sapphi-red force-pushed the 04-01-feat_minifier_compress_foo_true_into_foo_1_ branch from 0282325 to ecfb05d Compare April 2, 2025 03:14
@sapphi-red sapphi-red force-pushed the 04-01-feat_minifier_compress_if_foo_bar_to_if_foo_bar_ branch from 4616725 to e4a3495 Compare April 2, 2025 03:14
@graphite-app graphite-app bot changed the base branch from 04-01-feat_minifier_compress_foo_true_into_foo_1_ to graphite-base/10164 April 2, 2025 03:24
@graphite-app graphite-app bot changed the base branch from graphite-base/10164 to main April 2, 2025 03:33
`if (foo, !!bar)` can be compressed to `if (foo, bar)` because the last value is used as a boolean.
@graphite-app graphite-app bot force-pushed the 04-01-feat_minifier_compress_if_foo_bar_to_if_foo_bar_ branch from e4a3495 to bc5411d Compare April 2, 2025 03:34
@graphite-app graphite-app bot merged commit bc5411d into main Apr 2, 2025
28 checks passed
@graphite-app graphite-app bot deleted the 04-01-feat_minifier_compress_if_foo_bar_to_if_foo_bar_ branch April 2, 2025 03:47
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Apr 2, 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