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

fix(estree): make type of BigIntLiteral::raw prop in ESTree AST optional #7663

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Dec 5, 2024

BigIntLiteral's raw field is not an Option on Rust side, but this is an internal implementation detail - we may parse bigints to a BigInt in future (as we did in the past before we hit a memory leak problem), and make raw an Option.

So at present, the raw field is always non-null in JS-side AST. But update the TS type def to reflect that it should be an optional property. This aligns with ESTree.

Copy link

graphite-app bot commented Dec 5, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added A-ast Area - AST C-bug Category - Bug labels Dec 5, 2024
@overlookmotel overlookmotel marked this pull request as ready for review December 5, 2024 00:52
@overlookmotel overlookmotel changed the title fix(estree): make type of BigIntLiteral::raw prop in ESTree optional fix(estree): make type of BigIntLiteral::raw prop in ESTree AST optional Dec 5, 2024
Copy link

codspeed-hq bot commented Dec 5, 2024

CodSpeed Performance Report

Merging #7663 will not alter performance

Comparing 12-05-fix_estree_make_type_of_bigintliteral_raw_prop_in_estree_optional (2179b93) with main (8993e89)

Summary

✅ 29 untouched benchmarks

@overlookmotel overlookmotel force-pushed the 12-05-fix_estree_raw_null_in_estree_ast_for_generated_nullliteral_s branch from 58e33b8 to f66b55c Compare December 5, 2024 01:26
@overlookmotel overlookmotel force-pushed the 12-05-fix_estree_make_type_of_bigintliteral_raw_prop_in_estree_optional branch from 883208c to a8c61c6 Compare December 5, 2024 01:26
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Dec 5, 2024
Copy link
Member

Dunqing commented Dec 5, 2024

Merge activity

  • Dec 4, 11:00 PM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 4, 11:00 PM EST: A user added this pull request to the Graphite merge queue.
  • Dec 4, 11:14 PM EST: A user merged this pull request with the Graphite merge queue.

…ional (#7663)

`BigIntLiteral`'s `raw` field is not an `Option` on Rust side, but this is an internal implementation detail - we may parse bigints to a `BigInt` in future (as we did in the past before we hit a memory leak problem), and make `raw` an `Option`.

So at present, the `raw` field is always non-null in JS-side AST. But update the TS type def to reflect that it should be an optional property. This aligns with ESTree.
@Dunqing Dunqing force-pushed the 12-05-fix_estree_raw_null_in_estree_ast_for_generated_nullliteral_s branch from f66b55c to cbba26c Compare December 5, 2024 04:01
@Dunqing Dunqing force-pushed the 12-05-fix_estree_make_type_of_bigintliteral_raw_prop_in_estree_optional branch from a8c61c6 to 2179b93 Compare December 5, 2024 04:02
Base automatically changed from 12-05-fix_estree_raw_null_in_estree_ast_for_generated_nullliteral_s to main December 5, 2024 04:11
@graphite-app graphite-app bot merged commit 2179b93 into main Dec 5, 2024
25 checks passed
@graphite-app graphite-app bot deleted the 12-05-fix_estree_make_type_of_bigintliteral_raw_prop_in_estree_optional branch December 5, 2024 04:14
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-ast Area - AST C-bug Category - Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants