Closed Bug 1795756 Opened 2 years ago Closed 1 year ago

Enable NumberFormat v3

Categories

(Core :: JavaScript: Internationalization API, task, P3)

task

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: gregtatum, Assigned: anba)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete)

Attachments

(12 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

This was implemented in Bug 1763607, but is currently Nightly-only. This bug is for tracking enabling the features. I didn't see another one already filed.

Priority: -- → P3
Blocks: 1795317
Depends on: 1808799
Assignee: nobody → dminor

Apply the Intl mathematical value limits from [1] to our code. The minimum and
maximum exponents are now limited by Number.MIN_VALUE resp. Number.MAX_VALUE,
which are both way below our previous limit of 9'999'999.

Also removes the BigInt exponent check, because JS::BigInt::MaxDigitLength
already ensured that the maximum exponent has a reasonable value for BigInts.

Updates the tests to ensure new limits are correctly applied.

[1] https://github.com/tc39/proposal-intl-numberformat-v3/pull/128

DecimalNumber is no longer needed after part 1, so we can remove it from
the source tree.

Depends on D179942

Update useGrouping option parsing to allow the strings "true" and "false",
but reject any other strings.

Depends on D179943

Updates SetNumberFormatDigitOptions per [1] and [2]. The next two parts will
update Intl.PluralRules to process the new roundingMode, roundingIncrement,
and trailingZeroDisplay options.

[1] https://github.com/tc39/proposal-intl-numberformat-v3/pull/102
[2] https://github.com/tc39/proposal-intl-numberformat-v3/pull/130

Depends on D179944

Required updates for the next patch in this stack.

Also replaces PluralRulesOptions::RoundingPriority with an alias to
NumberFormatOptions::RoundingPriority, so we don't have to duplicate the
RoundingPriority and RoundingMode enums.

Depends on D179945

Removes the NIGHTLY_BUILD guards around Intl.NumberFormat v3 changes. The next
patches will perform further clean-ups.

Depends on D179948

This to-do note is no longer necessary, because the issue has been fixed at
some point in the spec.

Depends on D179949

Sync the implementation of Intl.NumberFormat with the current spec.

Depends on D179950

Sync the implementation of Intl.PluralRules with the current spec text.

Depends on D179951

Part 7 enabled NumberFormat v3 by default, so we no longer have to check
release_or_beta for the tests.

Depends on D179952

Also remove the release_or_beta from the test262 tests.

Depends on D179953

Anba is handling this one :)

Assignee: dminor → andrebargull
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/8535279b218b Part 1: Update ToIntlMathematicalValue to apply exponent limits. r=dminor https://hg.mozilla.org/integration/autoland/rev/162c97d8ff6d Part 2: Remove DecimalNumber. r=dminor https://hg.mozilla.org/integration/autoland/rev/c8a92856eb65 Part 3: Update GetStringOrBooleanOption and useGrouping. r=dminor https://hg.mozilla.org/integration/autoland/rev/dd7ba758f201 Part 4: Update SetNumberFormatDigitOptions. r=dminor https://hg.mozilla.org/integration/autoland/rev/487936c8e30f Part 5: Support roundingMode, roundingIncrement, and stripTrailingZero for PluralRules. r=platform-i18n-reviewers,dminor https://hg.mozilla.org/integration/autoland/rev/cc76bb24ee42 Part 6: Support roundingMode, roundingIncrement, and trailingZeroDisplay for Intl.PluralRules. r=dminor https://hg.mozilla.org/integration/autoland/rev/9f247edc6c08 Part 7: Ship Intl.NumberFormat v3. r=dminor https://hg.mozilla.org/integration/autoland/rev/18e70bddf7f3 Part 8: Resolved no longer valid to-do note. r=dminor https://hg.mozilla.org/integration/autoland/rev/2fdf668a9aa4 Part 9: Sync spec steps and comments for Intl.NumberFormat. r=dminor https://hg.mozilla.org/integration/autoland/rev/62d93979c1b0 Part 10: Sync spec steps and comments for Intl.PluralRules. r=dminor https://hg.mozilla.org/integration/autoland/rev/0a739a37e5f7 Part 11: Remove release-or-beta check from NumberFormat v3 tests. r=dminor https://hg.mozilla.org/integration/autoland/rev/24bc1e52a267 Part 12: Remove release-or-beta check for test262 Intl.NumberFormat v3 tests. r=dminor
Regressions: 1844714

FF116 MDN docs work for this can be tracked in https://github.com/mdn/content/issues/27746 (in review). This was mostly BCD updates, and updates to include the new changes to PluralRules constructor options that other browsers do not appear to have implemented yet.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: