swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(es/minifier): guard computed class keys in new functions Computed class element keys are evaluated while defining the class and can run in the surrounding constructor scope. The usage analyzer may not mark the outer constructor scope as using arguments for these keys, so the new-function argument cleanup must handle them explicitly. Bail out when the current constructor evaluation context may observe the constructor argument list through arguments, this, a referenced named function expression, new.target, or eval, including computed class keys and class heritage expressions. Add fixture and execution coverage for computed class key cases.
skku970412:fix-new-expr-useless-args-11684
6 hours ago
fix(es/minifier): guard new function param observability Default parameter initializers run before the constructor body and can observe the actual constructor argument list through new.target, this.constructor, or a referenced named function expression.\n\nInclude function parameters in the direct new-function constructor observability checks before dropping trailing pure extra arguments, and add fixture plus execution coverage for these parameter-default cases.
skku970412:fix-new-expr-useless-args-11684
7 hours ago
fix(es/minifier): guard new function arg observability Constructor calls can expose their actual argument list through the constructor function object in sloppy-mode code, for example through `this.constructor.arguments` or a referenced named function expression.\n\nTighten the direct new-function argument cleanup so it bails out when the constructor body may reach the current function object or dynamically observe invocation arguments. This includes lexical `arguments`, eval, with, `this`, referenced function-expression identifiers, new.target, rest parameters, and spread argument lists.\n\nAdd fixture and execution coverage for the observed argument-list cases.
skku970412:fix-new-expr-useless-args-11684
7 hours ago
fix(es/minifier): preserve spread args in new function expr Spread arguments have dynamic runtime arity, so a syntactic trailing argument after a spread cannot be classified as unused based only on the formal parameter count.\n\nSkip the new-function argument cleanup whenever the NewExpr argument list contains a spread, and add fixture plus execution coverage for a spread-before-trailing-argument case.
skku970412:fix-new-expr-useless-args-11684
8 hours ago
fix(react-compiler): Remove React-like prefilter (#12007) **Description:** Remove SWC's React-like function prefilter and defer compilation eligibility to React Compiler. The prefilter duplicates React Compiler policy and rejects source before the compiler can evaluate it. For example: ```jsx function createFoo() { return function Foo() { "use memo"; return <div>hello, world</div>; }; } ``` React Compiler's Babel integration compiles the annotated inner function, but SWC previously returned the source unchanged because `createFoo` did not look React-like and the prefilter intentionally did not inspect nested function bodies. This pattern is not necessarily a React-blessed use of the directive nor is it conventional React. Regardless, the SWC adapter should not impose a stricter eligibility policy or limit valid uses of the React Compiler API. React Compiler should remain responsible for deciding what to compile. This PR removes the React-like heuristic while retaining the separate guard for unsupported resource-management declarations. It also adds a fixture covering the nested directive case. **Related issue (if exists):** N/A **Verification:** - `cargo fmt --all` - `cargo test -p swc_ecma_react_compiler` - `cargo clippy --all --all-targets -- -D warnings` --- _Prepared with assistance from OpenAI Codex 🤖._
main
10 hours ago
Merge branch 'main' into jordant/remove-react-prefilter
imjordanxd:jordant/remove-react-prefilter
10 hours ago
feat(test262): harden conformance runtime
refactor/test262
13 hours ago
refactor: remove direct rkyv dependencies (#12010) ## Summary - Remove SWC's direct `rkyv`, `bytecheck`, and `rancor` dependencies and archive implementations. - Keep plugin serialization on CBOR and refresh path-based plugin fixture lockfiles. - Retain only transitive rkyv usage from Wasmer and lightningcss. ## Validation - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` - `cargo test` for all changed Rust crates - Plugin and host feature checks --- Closes https://github.com/swc-project/swc/issues/11991
main
15 hours ago
Latest Branches
CodSpeed Performance Gauge
0%
fix(es/minifier): drop pure extra args of new function expr
#12012
6 hours ago
d8539e7
skku970412:fix-new-expr-useless-args-11684
CodSpeed Performance Gauge
0%
fix(react-compiler): Remove React-like prefilter
#12007
10 hours ago
9dccf65
imjordanxd:jordant/remove-react-prefilter
CodSpeed Performance Gauge
0%
feat(test262): add official Test262 conformance runner
#12011
13 hours ago
55a2f22
refactor/test262
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs