Skip to content

fix(transform): preserve decorated class static initialization - #43940

Merged
Pavel Feldman (pavelfeldman) merged 1 commit into
mainfrom
triage/43936/42115236247-1
Nov 5, 2026
Merged

Pavel Feldman (pavelfeldman) merged 1 commit into
mainfrom
triage/43936/42115236247-1

Conversation

@microsoft-playwright-automation

Copy link
Copy Markdown
Contributor

Type-only field stripping revisits classes generated by Babel's decorator transform and removes a computed field that initializes the decorated class. Run stripping in a single Program traversal before the other transforms so generated fields remain intact.

Extend the existing class-field semantics tests with a class decorator, static field and static block, retaining the assignment/definition assertions. Both assignment-mode cases fail without the fix and pass with it.

Verified the ESM reproduction, all 18 Babel tests, all 31 neighbouring ESM tests, the build and full lint checks.

Fixes #43936

Triaged on Linux by the Playwright bot - agent run

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

23588 passed, 705 skipped


Merge workflow run.

@pavelfeldman
Pavel Feldman (pavelfeldman) marked this pull request as ready for review November 5, 2026 22:25
@pavelfeldman
Pavel Feldman (pavelfeldman) merged commit 89c9341 into main Nov 5, 2026
31 checks passed
@pavelfeldman
Pavel Feldman (pavelfeldman) deleted the triage/43936/42115236247-1 branch November 5, 2026 22:25
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

5194 passed, 616 skipped


Merge workflow run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Regression]: decorated class with a static field fails to load in 1.65 ("_initClass is not a function") with useDefineForClassFields: false

1 participant