Skip to content

refactor(transformer): share class name and AST helpers - #29445

Merged
graphite-app[bot] merged 1 commit into
mainfrom
transformer-shared-class-helpers
Nov 16, 2026
Merged

graphite-app[bot] merged 1 commit into
mainfrom
transformer-shared-class-helpers

Conversation

@Dunqing

@Dunqing Dunqing commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Contextual class-name inference and the variable-declaration and WeakSet builders live under ES2022 transforms despite being reusable by other class transforms. Move them into transformer utilities and update their existing callers, preserving the helper bodies, scopes, identifiers, and generated output.

Verified with just fmt, just test -p oxc_transformer (39 tests), and just lint -p oxc_transformer. Full transform conformance output and exec reports are byte-identical to the parent, including existing failures; all 476 generated exec files are byte-identical. cargo allocs leaves all allocation snapshots unchanged.

AI assistance was used to implement and verify this refactor.

Dunqing commented Nov 13, 2026 •

Copy link
Copy Markdown
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 changes, fast-track this PR to the front of the merge queue

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 the A-transformer Area - JS/TS transforms and downleveling, oxc_transformer label Nov 13, 2026
@codspeed

codspeed Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 81 untouched benchmarks
⏩ 29 skipped benchmarks1


Comparing transformer-shared-class-helpers (b2f7a5e) with fix-transformer-keep-decorated-fields (b417870)

Open in CodSpeed

Footnotes

  1. 29 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

Dunqing commented Nov 16, 2026 •

Copy link
Copy Markdown
Member Author

Merge activity

@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Nov 16, 2026
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Nov 16, 2026
@cursor
cursor Bot changed the base branch from fix-transformer-keep-decorated-fields to graphite-base/29445 November 16, 2026 07:51
graphite-app Bot pushed a commit that referenced this pull request Nov 16, 2026
Contextual class-name inference and the variable-declaration and WeakSet builders live under ES2022 transforms despite being reusable by other class transforms. Move them into transformer utilities and update their existing callers, preserving the helper bodies, scopes, identifiers, and generated output.

Verified with `just fmt`, `just test -p oxc_transformer` (39 tests), and `just lint -p oxc_transformer`. Full transform conformance output and exec reports are byte-identical to the parent, including existing failures; all 476 generated exec files are byte-identical. `cargo allocs` leaves all allocation snapshots unchanged.

AI assistance was used to implement and verify this refactor.
@graphite-app
graphite-app Bot force-pushed the transformer-shared-class-helpers branch from b2f7a5e to c3d4cbb Compare November 16, 2026 08:19
@graphite-app
graphite-app Bot changed the base branch from graphite-base/29445 to fix-transformer-keep-decorated-fields November 16, 2026 08:19
Contextual class-name inference and the variable-declaration and WeakSet builders live under ES2022 transforms despite being reusable by other class transforms. Move them into transformer utilities and update their existing callers, preserving the helper bodies, scopes, identifiers, and generated output.

Verified with `just fmt`, `just test -p oxc_transformer` (39 tests), and `just lint -p oxc_transformer`. Full transform conformance output and exec reports are byte-identical to the parent, including existing failures; all 476 generated exec files are byte-identical. `cargo allocs` leaves all allocation snapshots unchanged.

AI assistance was used to implement and verify this refactor.
@graphite-app
graphite-app Bot force-pushed the fix-transformer-keep-decorated-fields branch from f523654 to d520358 Compare November 16, 2026 08:21
@graphite-app
graphite-app Bot force-pushed the transformer-shared-class-helpers branch from c3d4cbb to fe2e300 Compare November 16, 2026 08:22
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Nov 16, 2026
Base automatically changed from fix-transformer-keep-decorated-fields to main November 16, 2026 08:25
@graphite-app
graphite-app Bot merged commit fe2e300 into main Nov 16, 2026
33 checks passed
@graphite-app
graphite-app Bot deleted the transformer-shared-class-helpers branch November 16, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-transformer Area - JS/TS transforms and downleveling, oxc_transformer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant