fix(es/minifier): preserve undefined parameter defaults - #12233
labor0-bot[bot] wants to merge 4 commits into
Conversation
|
|
|
Continue working with Labor0Submit a formal review from Files changed, or leave an inline review comment; neither requires an Reviews from collaborators with Write, Maintain, or Admin access are handled automatically. Ask a question for an explanation, or request a code change and Labor0 will evaluate it and update this pull request when appropriate. Successful change requests update the branch without a routine completion reply. Labor0 replies to questions and non-actionable feedback and resolves each processed inline review thread unless clarification is required. Conversation comments have no review thread to resolve. Automated review boilerplate paired with selected inline feedback does not receive a separate reply. Related feedback may be handled together, so wait for any necessary replies, new commits, and required checks before merging. Labor0 task status
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8bc9f59171
ℹ️ 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
|
Description:
Preserve root function-parameter defaults that evaluate to
undefined. Removingthem changes
Function.lengthand turns non-arrow functions with an otherwisesimple parameter list into functions with mapped
arguments.The pure minifier now visits parameter-pattern children without simplifying the
root pattern. This retains observable parameter defaults while preserving the
existing simplification for nested and non-parameter patterns.
Adds SWC-owned issue fixtures covering function arity, mapped arguments, and a
non-parameter destructuring control.
Related issue (if exists):
Closes #12203
Verification:
UPDATE=1 cargo test -p swc_ecma_minifiercargo test -p swc_ecma_minifier./scripts/test.sh./scripts/exec.shcargo fmt --allcargo clippy --all --all-targets -- -D warningsis blocked because hosted-runner policy disablesgit submodule update --init --recursive; required HTML5lib and Test262 fixture submodules are unavailable.