Avatar for the swc-project user
swc-project
swc
BlogDocsChangelog

Performance History

Latest Results

fix(react-compiler): preserve TypeScript function overload signatures (#12115) **Description:** Preserve whether a function originally had an implementation body when converting through the React Compiler AST. React Compiler's `FunctionDeclaration` representation always contains a block body. The SWC converter therefore synthesized an empty block for TypeScript overload signatures, but the reverse conversion did not restore the original missing body. The TypeScript transform then treated every overload signature as a concrete runtime function, producing duplicate default exports. This change records the original body presence in `PreservedAst` and restores `None` for overload signatures. The integration test forces React Compiler output with `compilationMode: "all"` and verifies that the overloads remain bodyless while the implementation retains its body. Validation: - `cargo fmt --all` - `cargo test -p swc_ecma_react_compiler` - `cargo clippy --all --all-targets -- -D warnings` **BREAKING CHANGE:** None. **Related issue (if exists):** https://github.com/web-infra-dev/rspack/issues/15158
main
4 hours ago
chore: Add changeset
CPunisher:codex/fix-cargo-deny-lru-advisory
5 hours ago
chore: Add changeset
codex/fix-react-compiler-default-overload
7 hours ago
chore: Support specified PRs in add-changeset skill
kdy1:kdy1/add-changeset-pr-target-push
1 day ago
fix(es/minifier): remove unused variable initializer cycles (#12106) **Description:** DCE previously visited variable initializers without associating deferred references with the initialized binding. References inside function, arrow, and eligible class expressions were therefore treated as top-level graph entries, which prevented otherwise unreachable dependency cycles from being removed. For example: ```js var AsyncParsePluginContext = class { parse(current) { return parseAsync(current); } }; async function parseAsync() { return new AsyncParsePluginContext(); } ``` The reference to `parseAsync` was incorrectly treated as an entry: ```text entry -> parseAsync -> AsyncParsePluginContext ``` This PR attributes references from direct deferred-value initializers to their variable binding: ```text AsyncParsePluginContext <-> parseAsync ``` With no external entry into this strongly connected component, DCE can remove the entire unused cycle. The optimization applies to identifier bindings initialized directly with: - Function expressions - Arrow functions - Class expressions without heritage, decorators, computed keys, static initialization, or other observable definition-time work Named function and class expressions are also handled using their local expression bindings, preventing self-references from being mistaken for references to outer declarations with the same symbol. The conservative behavior is preserved for eager or potentially observable initializers, including: - Destructuring bindings - Class heritage - Effectful class definitions - Static initialization - Eager `let` and `const` dependency cycles The new DCE fixture covers: - Removable `var`, `let`, and `const` function and class expression cycles - Cycles retained through an external reference - Named function and class expression bindings - Class heritage and effectful static initialization - Eager `let` and `const` cycles The minifier size snapshot is also updated to reflect the resulting `echarts.js` gzip reduction from `314.10 KiB` to `314.09 KiB`. **Testing:** - `cargo test -p swc_ecma_transforms_optimization` - `cargo test -p swc_ecma_minifier` - `crates/swc_ecma_minifier/scripts/exec.sh` - `crates/swc_ecma_minifier/scripts/test.sh` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings`
main
1 day ago
chore: Add changeset
SyMind:codex/fix-unused-var-init-cycle
1 day ago

Latest Branches

CodSpeed Performance Gauge
0%
chore(deps): Update lru to 0.18.2 to fix cargo deny#12116
5 hours ago
dbc4a4e
CPunisher:codex/fix-cargo-deny-lru-advisory
CodSpeed Performance Gauge
0%
fix(react-compiler): preserve TypeScript function overload signatures#12115
7 hours ago
15d0b4f
codex/fix-react-compiler-default-overload
CodSpeed Performance Gauge
+2%
10 hours ago
469c8e2
PingouinFerreux:fix/star-history-chart
© 2026 CodSpeed Technology
Home Terms Privacy Docs