Skip to content

feat(transformer/class-properties): support private_fields_as_properties assumption#7717

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption
Dec 10, 2024
Merged

feat(transformer/class-properties): support private_fields_as_properties assumption#7717
graphite-app[bot] merged 1 commit intomainfrom
12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 7, 2024

Support private_fields_as_properties assumption in class properties transform. This assumption is also enabled by the transform's loose option.

Optional chain (e.g. this?.#prop) is not yet implemented, but all other usages of private fields are supported. We'll handle optional chain in a follow-on PR.

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 7, 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 7, 2024

CodSpeed Performance Report

Merging #7717 will not alter performance

Comparing 12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption (2e69720) with 12-09-refactor_traverse_remove_traversectx_is_static_ (5d6fa25)

Summary

✅ 29 untouched benchmarks

@overlookmotel overlookmotel force-pushed the 12-07-refactor_transformer_class-properties_rename_classpropertiesoptions_loose_ branch from 75bb582 to 9dd0e00 Compare December 7, 2024 19:00
@overlookmotel overlookmotel force-pushed the 12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption branch 2 times, most recently from 1061ad5 to f30ed2e Compare December 7, 2024 20:10
@github-actions github-actions bot added the A-ast Area - AST label Dec 7, 2024
@Dunqing Dunqing changed the base branch from 12-07-refactor_transformer_class-properties_rename_classpropertiesoptions_loose_ to graphite-base/7717 December 8, 2024 01:47
@Dunqing Dunqing force-pushed the graphite-base/7717 branch from 9dd0e00 to 5913200 Compare December 8, 2024 02:21
@Dunqing Dunqing force-pushed the 12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption branch from f30ed2e to 04ec66b Compare December 8, 2024 02:21
@Dunqing Dunqing changed the base branch from graphite-base/7717 to main December 8, 2024 02:22
@Dunqing Dunqing force-pushed the 12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption branch from 04ec66b to 0fe9a92 Compare December 8, 2024 02:22
@overlookmotel overlookmotel force-pushed the 12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption branch 3 times, most recently from b1c4455 to c84661f Compare December 8, 2024 13:38
@overlookmotel overlookmotel changed the base branch from main to 12-08-test_transformer_class-properties_override_test_outputfor__super_in_class_constructor December 8, 2024 13:38
@overlookmotel overlookmotel force-pushed the 12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption branch from 70958f5 to 0078e41 Compare December 9, 2024 14:23
@overlookmotel overlookmotel changed the base branch from graphite-base/7717 to main December 9, 2024 14:24
@overlookmotel overlookmotel force-pushed the 12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption branch 2 times, most recently from 3d56895 to 9093083 Compare December 10, 2024 00:34
@overlookmotel overlookmotel changed the base branch from main to 12-09-refactor_traverse_remove_traversectx_is_static_ December 10, 2024 00:34
@overlookmotel overlookmotel force-pushed the 12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption branch 3 times, most recently from 61578fd to d403aa2 Compare December 10, 2024 01:02
@overlookmotel overlookmotel marked this pull request as ready for review December 10, 2024 01:03
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Dec 10, 2024
Copy link
Member

Dunqing commented Dec 10, 2024

Merge activity

  • Dec 9, 9:27 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 9, 9:27 PM EST: A user added this pull request to the Graphite merge queue.
  • Dec 9, 10:15 PM EST: A user merged this pull request with the Graphite merge queue.

…ties` assumption (#7717)

Support `private_fields_as_properties` assumption in class properties transform. This assumption is also enabled by the transform's `loose` option.

Optional chain (e.g. `this?.#prop`) is not yet implemented, but all other usages of private fields are supported. We'll handle optional chain in a follow-on PR.
@Dunqing Dunqing force-pushed the 12-09-refactor_traverse_remove_traversectx_is_static_ branch from 2bcaebc to 5d6fa25 Compare December 10, 2024 02:32
@Dunqing Dunqing requested a review from Boshen as a code owner December 10, 2024 02:32
@Dunqing Dunqing force-pushed the 12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption branch from d403aa2 to 2e69720 Compare December 10, 2024 02:33
Base automatically changed from 12-09-refactor_traverse_remove_traversectx_is_static_ to main December 10, 2024 03:12
@graphite-app graphite-app bot merged commit 2e69720 into main Dec 10, 2024
@graphite-app graphite-app bot deleted the 12-07-feat_transformer_class-properties_support_private_fields_as_properties_assumption branch December 10, 2024 03:15
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-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants