fix(es/minifier): retain class evaluation semantics - #12331
labor0-bot[bot] wants to merge 5 commits into
Conversation
🦋 Changeset detectedLatest commit: 9a13962 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
|
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62024bec0f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "Codex (@codex) address that feedback".
Description:
Preserve class evaluation when side-effect extraction would change implicit strict-mode behavior or skip superclass constructor/null validation. The extractor now retains classes with non-
nullheritage and declines sloppy-context assignments and deletions, while preserving safe extraction in strict, no-heritage, andextends nullcases.Add SWC-owned execution fixtures for static public/private/block assignments, heritage
TypeErrors, valid controls, and static-call ordering. Add a patch changeset forswc_ecma_minifierandswc_core.Related issue (if exists):
Closes #12309
Closes #12310
Testing:
UPDATE=1 cargo test -p swc_ecma_minifiercargo test -p swc_ecma_minifier./scripts/exec.shcargo fmt --allcargo clippy -p swc_ecma_minifier --all-targets -- -D warningsUnavailable:
git submodule update --init --recursiveis disabled by the runner because submodules require independently bound credentials;./scripts/test.shfails inswc --test tscon stale derived-class snapshots; workspace-wide Clippy is blocked by absent html5lib submodule fixtures.