swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Optimizations
Branches
Benchmarks
Runs
Performance History
Latest Results
chore: Add changeset
fix/type-strip-rewrite
4 hours ago
fix(es/minifier): keep `trimLeft` and `trimRight` on string literals (#12574) The minifier replaced a property read of `trimLeft` or `trimRight` on a string literal with `void 0`. Both are standard `String.prototype` methods (ECMA-262 Annex B aliases of `trimStart` and `trimEnd`), so `"".trimLeft` is a function, not `undefined`. This broke feature detection such as core-js `"".trimLeft !== String.prototype.trimStart`. `Pure::optimize_member_expr` folds a string literal property read to `undefined` when the property name is not in `STRING_SYMBOLS` or `OBJECT_SYMBOLS`. `STRING_SYMBOLS` had `trimStart` and `trimEnd`, but not `trimLeft` and `trimRight`. This PR adds `trimLeft` and `trimRight` to `STRING_SYMBOLS`. It also adds the fixture `tests/fixture/issues/12570`. Validation, run locally on the changed code: - `./scripts/test.sh` in `crates/swc_ecma_minifier`: 2219 passed, 0 failed. - `./scripts/exec.sh` in `crates/swc_ecma_minifier`: 2128 passed, 0 failed. - `cargo clippy -p swc_ecma_minifier --all-targets -- -D warnings`: no warnings. CI was not run locally. Closes #12570 Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
main
4 hours ago
test(es/typescript): organize and expand type erasure coverage Group fixtures by syntax and issue number while preserving existing diagnostic cases. Extend coverage for runtime boundaries, UTF-16 layout, TSX, source-map reuse, and the legacy module option. Add focused checks for edit rendering and token lookup.
fix/type-strip-rewrite
4 hours ago
feat(es/minifier): Implement more rules for if-break (#12561)
main
4 hours ago
fix(es/minifier): keep trimLeft and trimRight on string literals Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kdy1/fix-issue-12570
5 hours ago
fix(ts/fast-strip): Preserve ASI after erased class members Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kdy1/fix-issue-12568
5 hours ago
fix(es/parser): do not treat optional get/set fields as accessors (#12559) **Description:** In TypeScript classes, an uninitialized optional field `get?` or `set?` without a trailing semicolon was treated as an accessor keyword when followed by another member on the next line, such as `get?\nfoo() {}`. This dropped the field and misparsed the following member as a getter or setter, changing the emitted JavaScript. Guard `getter_or_setter_ident` with `!is_optional` so these fields are terminated by automatic semicolon insertion and the following member is parsed separately. Add parser and transform regression fixtures for both names. **Related issue (if exists):** - Close #12560
main
9 hours ago
fix(es/parser): recover non-entity expressions in TypeScript heritage clauses (#12552) **Description:** Heritage clauses such as `interface I extends (Base<T>) {}` currently fail with a fatal parse error. Parse complete left-hand-side expressions in `interface extends` and `class implements`, preserving the recovered AST and type arguments. Report recoverable `TS2499` diagnostics for non-entity references, including parenthesized expressions, computed accesses, and call-based references.
main
9 hours ago
Latest Branches
CodSpeed Performance Gauge
+4%
fix(ts/fast-strip): preserve runtime boundaries during type erasure
#12575
4 hours ago
0ad0250
fix/type-strip-rewrite
CodSpeed Performance Gauge
0%
fix(es/minifier): keep `trimLeft` and `trimRight` on string literals
#12574
5 hours ago
d87185d
kdy1/fix-issue-12570
CodSpeed Performance Gauge
0%
fix(ts/fast-strip): preserve ASI after erased class members
#12573
5 hours ago
37be334
kdy1/fix-issue-12568
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs