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): replace Number.POSITIVE_INFINITY/Number.NEGATIVE_INFINITY/Number.NaN #8681

Conversation

sapphi-red
Copy link
Contributor

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

The value of Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY, Number.NaN are constants as they cannot be changed. This PR replaces them with Infinity/-Infinity/NaN.

Reference

@github-actions github-actions bot added A-minifier Area - Minifier C-enhancement Category - New feature or request labels Jan 23, 2025
Copy link
Contributor Author

sapphi-red commented Jan 23, 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 force-pushed the 01-22-feat_minifier_replace_number.positive_infinity___number.negative_infinity___number.nan_ branch from 435b45e to 5896784 Compare January 23, 2025 15:20
@sapphi-red sapphi-red marked this pull request as ready for review January 23, 2025 15:24
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Jan 23, 2025
Copy link
Member

Boshen commented Jan 23, 2025

Merge activity

  • Jan 23, 10:25 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 23, 10:25 AM EST: A user added this pull request to the Graphite merge queue.
  • Jan 23, 10:31 AM EST: A user merged this pull request with the Graphite merge queue.

…NFINITY`/`Number.NaN` (#8681)

The value of `Number.POSITIVE_INFINITY`, `Number.NEGATIVE_INFINITY`, `Number.NaN` are constants as they cannot be changed. This PR replaces them with `Infinity`/`-Infinity`/`NaN`.

**Reference**
- Spec of [`Number.POSITIVE_INFINITY`](https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number.positive_infinity)
- Spec of [`Number.NEGATIVE_INFINITY`](https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number.positive_infinity)
- Spec of [`Number.NaN`](https://tc39.es/ecma262/multipage/numbers-and-dates.html#sec-number.positive_infinity)
@Boshen Boshen force-pushed the 01-22-feat_minifier_replace_number.positive_infinity___number.negative_infinity___number.nan_ branch from 5896784 to 0c5bb30 Compare January 23, 2025 15:26
@graphite-app graphite-app bot merged commit 0c5bb30 into main Jan 23, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 01-22-feat_minifier_replace_number.positive_infinity___number.negative_infinity___number.nan_ branch January 23, 2025 15:31
Copy link

codspeed-hq bot commented Jan 23, 2025

CodSpeed Performance Report

Merging #8681 will not alter performance

Comparing 01-22-feat_minifier_replace_number.positive_infinity___number.negative_infinity___number.nan_ (0c5bb30) with main (99607d3)

Summary

✅ 32 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