swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(es/hygiene): Ignore eval in default hygiene pass (#12003) **Description:** Fixes hygiene renaming when transformed code contains direct `eval`. Previously, the default hygiene pass treated `eval`/`with` as a reason to avoid renaming user-written bindings. That left SWC in an unsafe middle state for ES5 transforms: block-scoped bindings could be lowered to `var`, but conflicting names would not be renamed afterward, causing scope collisions. This PR keeps `Config::default()` conservative, and adds `Config::hygiene_default()` for SWC’s normal correctness hygiene behavior. The default `hygiene()` pass now uses that config, so it still resolves identifier conflicts even when `eval` is present. Minifier name mangling remains controlled separately by `mangle.eval`. Also adds a regression fixture for #9791, ensuring the inner `show_type` binding is renamed while the later `eval`-containing callback still reads the outer `show_type`. Validation run: - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` - `cargo test -p swc 9791 --test projects` - `cargo test -p swc_ecma_transforms_base hygiene --lib` **BREAKING CHANGE:** None. **Related issue:** - Closes: #9791 - Closes: #12001 - Closes: #12002
main
4 minutes ago
Merge branch 'main' into fix/issue-9791
fix/issue-9791
39 minutes ago
Merge branch 'main' into fix-4014-fresh
Kaus1ubh:fix-4014-fresh
39 minutes ago
Merge branch 'main' into main
AmariahAK:main
39 minutes ago
Merge branch 'main' into refactor/swc-helpers
refactor/swc-helpers
39 minutes ago
fix(deps): update crossbeam-epoch to 0.9.20 (#12004)
main
39 minutes ago
chore: Add React Compiler changeset
imjordanxd:jordant/remove-react-prefilter
15 hours ago
fix(react-compiler): defer compilation eligibility
imjordanxd:jordant/remove-react-prefilter
15 hours ago
Latest Branches
CodSpeed Performance Gauge
+5%
fix(es/hygiene): Ignore eval in default hygiene pass
#12003
41 minutes ago
415a5b2
fix/issue-9791
CodSpeed Performance Gauge
-3%
feat(es/module): support moduleRoot for AMD module IDs
#11964
41 minutes ago
f2213da
Kaus1ubh:fix-4014-fresh
CodSpeed Performance Gauge
0%
fix(common): Replace unreachable_unchecked with safe panic in CacheCell::resolve
#12005
41 minutes ago
b47cc77
AmariahAK:main
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs