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

Performance History

Latest Results

fix(parser): parse flow component rest types in type context
kdy1/fix-11729-phase2
3 hours ago
fix(es/parser): parse key Flow forms from #11729 (phase 1) (#11733) ## Summary This is **Phase 1** for #11729 and focuses on the highest-impact Flow parser gaps seen in the React Native reproduction. - Parse typed arrow params with trailing comma in Flow (`(x: T,) => ...`) - Parse nullable anonymous function types (`?() => R`, `?(x: T) => R`, `?(...A) => R`) - Allow trailing comma in Flow mapped type members (`{ [K in keyof T]: T[K], }`) ## Changes - `crates/swc_ecma_parser/src/parser/expr.rs` - In `parse_args_or_pats`, consume delimiter/trailing comma before the Flow type-cast fast-path `continue`. - `crates/swc_ecma_parser/src/parser/typescript.rs` - In Flow nullable type parsing, when `?` is followed by `(`, parse using `parse_ts_non_conditional_type` so function types are accepted. - In `parse_ts_mapped_type`, allow optional trailing comma after mapped member type annotation in Flow mode. - Added fixtures: - `tests/flow/issue-11729-arrow-trailing-comma` - `tests/flow/issue-11729-nullable-anon-fn` - `tests/flow/issue-11729-mapped-type-trailing-comma` ## Validation - `git submodule update --init --recursive` - `UPDATE=1 cargo test -p swc_ecma_parser` - `cargo test -p swc_ecma_parser` - `UPDATE=1 cargo test -p swc_ecma_parser --features flow --test flow -- --ignored` - `cargo test -p swc_ecma_parser --features flow --test flow -- --ignored` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` ## Scope note This PR intentionally leaves the remaining Phase 2 items out of scope (e.g. `@@iterator`, advanced anonymous parameter signature cases, component rest-object forms).
main
7 hours ago
feat(react-compiler): improve SWC parity for early-return and hooks validation (#11738) ## Summary This draft continues the React Compiler SWC parity port inside `crates/swc_ecma_react_compiler`. Current upstream fixture status (continue mode): - `FAILED_FIXTURE`: **1029 / 1718** (was **1040 / 1718**) - `fixture mismatch`: **835** (was **842**) - `missing_diagnostic`: **163** (was **167**) - `missing_error_fragment`: **31** (unchanged) Early-return focused cluster: - `early-return*` subset: **11/15 -> 7/15** failures ## What Changed - Wire `@enablePropagateDepsInHIR` fixture pragma into environment/options and propagate `enable_forest` through the entrypoint. - Improve reactive lowering for `if` tails that return conditionally (early-return sentinel path), so components without a terminal `return` can still be memoized correctly. - Add targeted nested memoization parity for member-based single-element arrays in nested scopes, while guarding against over-memoization on local member deps. - Improve nested temp naming behavior across `if` branches to better match expected fixture output. - Add normalization to prune empty `else {}` blocks. - Extend Rules of Hooks validation to catch hook calls that happen after a conditional early return path. ## Files - `crates/swc_ecma_react_compiler/src/entrypoint/program.rs` - `crates/swc_ecma_react_compiler/src/reactive_scopes/mod.rs` - `crates/swc_ecma_react_compiler/src/validation/validate_hooks_usage.rs` - `crates/swc_ecma_react_compiler/tests/fixture.rs` ## Validation Executed locally: - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` - `cargo test -p swc_ecma_react_compiler --test fixture fixture_cases_local -- --nocapture` - `cargo test -p swc_ecma_react_compiler --test fixture fixture_cases_upstream_phase1 -- --nocapture` - `REACT_COMPILER_FIXTURE_CONTINUE_ON_FAIL=1 REACT_COMPILER_FIXTURE_ALLOW_FAILURE=1 cargo test -p swc_ecma_react_compiler --test fixture fixture_cases_upstream -- --nocapture` Note: - `cargo test -p swc_ecma_react_compiler` still fails due remaining upstream parity gaps (`fixture_cases_upstream`). ## Scope Note This draft is intentionally crate-parity-focused and does not expand `@swc/core` / `@swc/react-compiler` exposure.
main
7 hours ago
Create fifty-eagles-deliver.md
kdy1/fix-11729-flow-phase1
7 hours ago
chore(react-compiler): format updated parity changes
kdy1/react-compiler-parity-wave1-early-return
8 hours ago

Latest Branches

CodSpeed Performance Gauge
0%
fix(es/parser): close remaining Flow parser gaps for #11729 (phase 2)#11740
3 hours ago
39f65b5
kdy1/fix-11729-phase2
CodSpeed Performance Gauge
0%
7 hours ago
ea73a27
kdy1/react-compiler-m1-finalize
CodSpeed Performance Gauge
0%
fix(es/parser): parse key Flow forms from #11729 (phase 1)#11733
7 hours ago
32d349a
kdy1/fix-11729-flow-phase1
© 2026 CodSpeed Technology
Home Terms Privacy Docs