fix(es/minifier): Remove inert property writes to fresh objects - #12278
labor0-bot[bot] wants to merge 6 commits into
Conversation
🦋 Changeset detectedLatest commit: b05ef37 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 |
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e96db86b18
ℹ️ 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".
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: 8b126bd468
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f68c313274
ℹ️ 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:
Remove unused simple property writes to fresh RegExp literals and eligible function/class prototype objects with
pure_getters: true,side_effects: true, and pristine built-ins. Keep RHS evaluation, including bothx()andy(), and preserveSimulator'sthis._aircraftinitialization. Dynamic keys, accessors, spreads, escaped objects, and observable class initialization remain conservative.Activate only
properties/const_prop_assign_pure/input.js. Its existingoutput.terser.jspreserves both calls; accept that alternate baseline directly instead of rewritingoutput.jsduring validation. All existing Terser fixture assets and other backlog entries remain unchanged. Add six SWC-owned regression fixtures and patch changesets forswc_ecma_minifierandswc_core.Validation:
Passed:
cargo test -p swc_ecma_minifier --test compress fixture_tests__terser__compress__cargo test -p swc_ecma_minifier(cd crates/swc_ecma_minifier && ./scripts/test.sh)(cd crates/swc_ecma_minifier && ./scripts/exec.sh)cargo fmt --allcargo clippy -p swc_ecma_minifier --all-targets -- -D warningsUnavailable or blocked validation:
git submodule update --init --recursiveis disabled by the hosted runner because each submodule requires an independently bound repository credential.cargo clippy --all --all-targets -- -D warningsfails inswc_html_parser'shtml5lib_tests: the unavailable HTML5lib submodule causes twoNo test foundfixture-macro panics and consequent unused-import errors.Related issue (if exists):
None.