swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(es/fixer): preserve parens around IFFE in binary expressions within sequences (#11324) Fixes #11322 This PR fixes a bug in the fixer transform where parentheses around IIFEs (Immediately Invoked Function Expressions) were being incorrectly removed when the IFFE appeared in a specific context: as the left operand of a binary expression that is the first element of a sequence expression at statement level. ## Changes - Added special handling in sequence expression processing to detect and preserve parens around function expression callees - Added regression test cases - All existing tests continue to pass Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Donny/ź°ėģ¤ <kdy1@users.noreply.github.com>
main
10 hours ago
Create rotten-bikes-hug.md
claude/issue-11322-20251121-2309
10 hours ago
fix(es/transforms/base): preserve parens around IFFE in binary expressions within sequences Fixes swc-project#11322 When an IFFE (Immediately Invoked Function Expression) appears as the left operand of a binary expression that is the first element of a sequence expression at statement level, the fixer was incorrectly removing the parentheses around the function expression. This caused the code to be parsed as an invalid function declaration instead of a function expression. For example: - Input: `((function () { })() && a, b)` - Previous (buggy) output: `function() {}() && a, b;` (invalid syntax) - Fixed output: `(function () { })() && a, b` (valid syntax) The fix adds special handling in the sequence expression processing logic to detect when the first element is a binary expression containing a call with a function expression callee, and ensures the function expression is properly wrapped with parentheses. š¤ Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Donny/ź°ėģ¤ <kdy1@users.noreply.github.com>
claude/issue-11322-20251121-2309
11 hours ago
restore tests
kdy1/exponentation-operator
21 hours ago
perf(es/parser): Optimize `byte_search!` (#11323) **Description:** Align the implementation to oxc. In terms of swc, this pr reduces the calls of `bump_bytes`.
main
23 hours ago
Update patch dependencies and optimize byte search Optimize the byte search functionality in the parser.
CPunisher:11-21-perf/optimize-byte-search
23 hours ago
Optimize
CPunisher:11-21-perf/optimize-byte-search
1 day ago
fix(es/minifier): Remove unused arrow functions in dead code elimination (#11319) ## Description This PR fixes issue #11303 where the minifier was preserving unused arrow functions. ## Root Cause The `ignore_return_value` method in the optimizer handled function expressions (Expr::Fn) by returning None (indicating no side effects), but did not handle arrow functions (Expr::Arrow) the same way. Arrow functions would fall through to the default case and be preserved even when unused. ## Changes - Added handling for Expr::Arrow in ignore_return_value method - Arrow functions are now treated as side-effect-free expressions - Added test case for issue #11303 - Updated tinymce test expectation to reflect more aggressive optimization ## Test Results All 2790 tests pass. Closes #11303 š¤ Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Donny/ź°ėģ¤ <kdy1@users.noreply.github.com>
main
2 days ago
Active Branches
perf(es/compat): Merge `exponentation_operator`
last run
21 hours ago
#11310
CodSpeed Performance Gauge
-6%
perf(parser): Make all parsers work by byte instead of char
last run
2 days ago
#11318
CodSpeed Performance Gauge
-5%
perf(es/compat): Merge `object_rest_spread`
last run
2 days ago
#11312
CodSpeed Performance Gauge
-3%
Ā© 2025 CodSpeed Technology
Home
Terms
Privacy
Docs