swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(es/optimization): preserve JSON numeric values
fix/json-number-serialization
1 hour ago
fix(es/minifier): use numeric literals for non-finite values (#12048) **Description:** The optimizer currently represents `NaN` and infinities in several forms, including identifiers, divisions, and numeric literals. As these forms move through multiple optimization passes, they can be folded inconsistently and acquire incorrect truthiness or stringification. This PR canonicalizes non-finite optimization results as raw-free `Lit::Num` values. Minifier and simplifier helpers then preserve ECMAScript behavior for these numbers, while codegen remains responsible for choosing valid output syntax. **Related issue (if exists):** - #12043 - #12047 - #12050 - **#12048** (current) - #12051 - #12052 - #12053 - #12054 - #12055 - #12056 - #12057 - #12058 - #12049 - #12059 - #12060
main
2 hours ago
refactor(es/ast)!: split TypeScript this parameters
feat/ast-this-param
2 hours ago
Merge branch 'main' into chore/upgrade-regress-0.11
stormslowly:chore/upgrade-regress-0.11
21 hours ago
fix(es/minifier): index strings by UTF-16 code unit (#12054) **Description:** JavaScript string property indexing uses UTF-16 code units. Existing constant folding checked string-literal indices against WTF-8 byte length, which can treat out-of-bounds indices as valid for non-ASCII BMP characters, astral characters, and lone surrogates. In the expression simplifier, that mismatch could also reach an `unreachable!` branch. This PR validates and reads string-literal indices using UTF-16 code units in both the minifier and expression simplifier. It preserves the WTF-8 byte-length check as a fast upper-bound rejection, folds valid indices to the correct code unit, and handles UTF-16 out-of-bounds indices according to each pass's existing semantics. Coverage includes BMP non-ASCII characters, astral surrogate pairs, and lone surrogates. The change was verified with: - `cargo test -p swc_ecma_minifier -p swc_ecma_transforms_optimization` - `(cd crates/swc_ecma_minifier && ./scripts/exec.sh)` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` **Related issue (if exists):** - #12043 - #12047 - #12050 - #12048 - #12051 - #12052 - #12053 - **#12054** (current) - #12055 - #12056 - #12057 - #12058 - #12049 - #12059 - #12060
main
22 hours ago
fix(testing): check ignored fixtures relative to crate root (#12073) **Description:** - Check ignored fixtures relative to `CARGO_MANIFEST_DIR`. - Prevent hidden ancestor directories, such as `.codex` worktrees, from ignoring all fixtures. - Add regression coverage and clarify the documented behavior.
main
22 hours ago
fix(testing): check ignored fixtures relative to crate root
feat/scope-ignored-testing
23 hours ago
fix(es/minifier): index strings by UTF-16 code unit
fix/string-index-utf16
1 day ago
Latest Branches
CodSpeed Performance Gauge
0%
fix(es/optimization): preserve JSON numeric values
#12051
3 days ago
83df80f
fix/json-number-serialization
CodSpeed Performance Gauge
-4%
refactor(es/ast)!: split TypeScript this parameters
#12075
2 hours ago
e0a4c48
feat/ast-this-param
CodSpeed Performance Gauge
0%
chore: upgrade regress to 0.11.1
#12070
22 hours ago
3b9c098
stormslowly:chore/upgrade-regress-0.11
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs