Skip to content

refactor(ast): support #[estree(ts_alias)] attr on enums and use it on RegExpPattern and RegExpFlags#8953

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-07-refactor_ast_support_estree_ts_alias_attr_on_enums_and_use_it_on_regexppattern_and_regexpflags_
Feb 9, 2025
Merged

refactor(ast): support #[estree(ts_alias)] attr on enums and use it on RegExpPattern and RegExpFlags#8953
graphite-app[bot] merged 1 commit intomainfrom
02-07-refactor_ast_support_estree_ts_alias_attr_on_enums_and_use_it_on_regexppattern_and_regexpflags_

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Feb 7, 2025

It's preferable to specify how a type is serialized and its TS type on the type itself, rather than on fields containing that type. Support the #[estree(ts_alias = "...")] attr on enums (previously was only supported on structs). Use that attr on RegExpPattern and RegExpFlags.

@github-actions github-actions bot added A-ast Area - AST A-ast-tools Area - AST tools C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Feb 7, 2025
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.

@overlookmotel overlookmotel marked this pull request as ready for review February 7, 2025 10:58
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 7, 2025

CodSpeed Performance Report

Merging #8953 will not alter performance

Comparing 02-07-refactor_ast_support_estree_ts_alias_attr_on_enums_and_use_it_on_regexppattern_and_regexpflags_ (a1ca2eb) with main (a2883b1)

Summary

✅ 33 untouched benchmarks

@Boshen Boshen requested a review from hi-ogawa February 9, 2025 01:17
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Feb 9, 2025
Copy link
Member Author

overlookmotel commented Feb 9, 2025

Merge activity

  • Feb 9, 2:31 PM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 9, 2:31 PM EST: A user added this pull request to the Graphite merge queue.
  • Feb 9, 2:36 PM EST: A user merged this pull request with the Graphite merge queue.

… on `RegExpPattern` and `RegExpFlags` (#8953)

It's preferable to specify how a type is serialized and its TS type on the type itself, rather than on fields containing that type. Support the `#[estree(ts_alias = "...")]` attr on enums (previously was only supported on structs). Use that attr on `RegExpPattern` and `RegExpFlags`.
@graphite-app graphite-app bot force-pushed the 02-07-refactor_ast_support_estree_ts_alias_attr_on_enums_and_use_it_on_regexppattern_and_regexpflags_ branch from 646ffee to a1ca2eb Compare February 9, 2025 19:31
@graphite-app graphite-app bot merged commit a1ca2eb into main Feb 9, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 02-07-refactor_ast_support_estree_ts_alias_attr_on_enums_and_use_it_on_regexppattern_and_regexpflags_ branch February 9, 2025 19:36
Dunqing pushed a commit that referenced this pull request Feb 10, 2025
… on `RegExpPattern` and `RegExpFlags` (#8953)

It's preferable to specify how a type is serialized and its TS type on the type itself, rather than on fields containing that type. Support the `#[estree(ts_alias = "...")]` attr on enums (previously was only supported on structs). Use that attr on `RegExpPattern` and `RegExpFlags`.
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-ast-tools Area - AST tools 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.

2 participants