Repository navigation
fix(parser): improve radix literal rounding - #18445
Merged
Merged
Conversation
On 7.x, BigIntLiteral extra.rawValue is a string rather than a bigint.
Collaborator
Author
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/62688 |
|
commit: |
JLHwung
force-pushed
the
automation/backport-18420
branch
from
October 29, 2026 15:27
d553e41 to
ab1cb3a
Compare
This was referenced Nov 6, 2026
1 task
This was referenced Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #18420 to 7.x
Cherry-picked commits:
Conflicts: Resolved.
packages/babel-parser/src/tokenizer/index.ts: 7.x additionally has decimal (msuffix) support andisBigInt/hasExponenthandling. I kept the decimal logic and applied the newreadLiteralIntfast path. The fast path is skipped for decimals, andstris sliced up toend(before then/msuffix).packages/babel-parser/typings/babel-parser.d.ts: the file is structured differently on 7.x. The original change (removingInvalidNumber) was already reflected there, so I kept the 7.x version.Fix commit:
Fix bigint radix fixture output after backporting #18420: on 7.x,extra.rawValueof aBigIntLiteralis a string rather than a bigint. The fixturevalid-bigint-radix-above-max-safe-integertherefore usedoutput.jsoninstead ofoutput.extended.json, and I regenerated it.Checks:
make lint-ci check-compat-datacould not complete in this environment (ESLint ran out of memory, and cloning compat-table failed on a certificate error). ESLint and Prettier on the changed tokenizer file passed.babel-code-frame/test/color-detection.jsandbabel-core/test/errors-stacks.js. These failures are unrelated to this change (terminal color detection and error stacks) and were not fixed.Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
github.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.