Skip to content

refactor(ast)!: remove PrivateInExpression::operator field#9041

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-11-refactor_ast_remove_privateinexpression_operator_field
Feb 11, 2025
Merged

refactor(ast)!: remove PrivateInExpression::operator field#9041
graphite-app[bot] merged 1 commit intomainfrom
02-11-refactor_ast_remove_privateinexpression_operator_field

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 11, 2025

Remove PrivateInExpression::operator field.

This field had no purpose beyond getting correct serialization to ESTree - it was always BinaryOperator::In, and no other value for operator makes sense in this position. So remove the field from the Rust type, and produce the desired output in ESTree AST using #[estree(add_fields)] instead.

This follows on after changes made to serialization of PrivateInExpression in #9033.

Copy link
Member Author


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-parser Area - Parser A-ast Area - AST A-transformer Area - Transformer / Transpiler A-prettier C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Feb 11, 2025
@overlookmotel overlookmotel marked this pull request as ready for review February 11, 2025 10:59
@overlookmotel overlookmotel removed the request for review from Dunqing February 11, 2025 11:00
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 11, 2025

CodSpeed Performance Report

Merging #9041 will not alter performance

Comparing 02-11-refactor_ast_remove_privateinexpression_operator_field (d9189f1) with main (662ab90)

Summary

✅ 33 untouched benchmarks

@overlookmotel
Copy link
Member Author

@leaysgur I'm going to go ahead and merge this, as we've had lots of problems with merge conflicts while we're rapidly progressing ESTree compatibility, and I'd like to avoid that.

I think the change I've made to oxc_prettier in this PR is correct, but please can you check?

https://github.com/oxc-project/oxc/pull/9041/files#diff-9c2990ce80dd63f4dbddf5b1f4197febce7b425c895513b8cf414b50f4309d0d

If this PR causes you a problem, please let me know and we can revert it.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Feb 11, 2025
Copy link
Member Author

overlookmotel commented Feb 11, 2025

Merge activity

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

Remove `PrivateInExpression::operator` field.

This field had no purpose beyond getting correct serialization to ESTree - it was always `BinaryOperator::In`, and no other value for `operator` makes sense in this position. So remove the field from the Rust type, and produce the desired output in ESTree AST using `#[estree(add_fields)]` instead.

This follows on after changes made to serialization of `PrivateInExpression` in #9033.
@graphite-app graphite-app bot force-pushed the 02-11-refactor_ast_remove_privateinexpression_operator_field branch from c9a7999 to d9189f1 Compare February 11, 2025 11:05
@graphite-app graphite-app bot merged commit d9189f1 into main Feb 11, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 02-11-refactor_ast_remove_privateinexpression_operator_field branch February 11, 2025 11:10
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 A-parser Area - Parser A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant