Latest Results
fix(es/minifier): preserve pure annotation ownership (#12180)
**Description:**
Preserve PURE annotation ownership when parenthesis removal relocates a
leading comment onto an inner callee expression. The metadata pass now
checks the comment's original source span before promoting it to an
enclosing call, preventing observable outer invocations from being
treated as pure without hard-coding individual callee shapes.
Synthetic PURE spans and legitimate whole-call annotations retain their
existing behavior, including sequence-expression support. The existing
protections for nested direct calls, optional calls, constructors, and
tagged templates are also preserved.
Adds an executable SWC-owned regression fixture covering side-effectful
function-expression and helper-call callees, removable whole-call
annotations, sequence expressions, and call-like callees with
compression, mangling, and module mode enabled.
Validation:
- `cargo fmt --all`
- `cargo test -p swc_ecma_minifier`
- `crates/swc_ecma_minifier/./scripts/test.sh`
- `crates/swc_ecma_minifier/./scripts/exec.sh`
- `cargo clippy -p swc_ecma_minifier --all-targets -- -D warnings`
The runner could not initialize submodules because it reports that each
submodule requires an independently bound repository credential.
Consequently, workspace-wide Clippy could not compile the HTML parser's
absent `html5lib-tests` fixtures; strict Clippy for the changed crate
passes.
**Related issue (if exists):**
Closes #12177
---------
Co-authored-by: Labor0 Bot <279936132+labor0-bot[bot]@users.noreply.github.com> Latest Branches
0%
fix/minifier-unused-object-pattern-defaults 0%
labor0/fix-minifier-hoist-property-callees 0%
fix-12177-pure-annotation-ownership © 2026 CodSpeed Technology