swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
feat(react-compiler): M1 memo validators + lint gating alignment (#11739) ## Summary This PR implements the M1 slice of the React Compiler SWC port finalization plan: - implement non-placeholder validation for manual memo preservation and exhaustive deps - add shared dependency analysis helpers - align a subset of pipeline ordering/gating with upstream (`Pipeline.ts`) semantics ## Changes - Added dependency analysis side helpers in `validation/dependency.rs` - hook kind detection (`useMemo`/`useCallback`/effect hooks) - callback dependency collection - manual deps parsing and prefix matching - stable hook binding inference (`useRef`, state/reducer/transition setters) - Implemented `validate_preserved_manual_memoization` - emits `PreserveManualMemo` diagnostics for inferred-vs-source dep mismatch - currently conservative for empty deps arrays to avoid false-positive bailouts without upstream reactive sidecar - Implemented `validate_exhaustive_dependencies` - supports memo + effect modes (`all`, `missing-only`, `extra-only`) - emits `MemoDependencies` / `EffectExhaustiveDependencies` - Pipeline integration updates in `entrypoint/program.rs` - wired exhaustive deps validator with env flags - reordered `drop_manual_memoization` before `inline_immediately_invoked_function_expressions` - lint-only non-blocking gating for: - `validate_no_set_state_in_effects` - `validate_no_jsx_in_try_statement` - `validate_static_components` - Registered new module in `validation/mod.rs` ## Verification Ran: - `git submodule update --init --recursive` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` - `cargo test -p swc_ecma_react_compiler fixture_cases_local -- --nocapture` - `cargo test -p swc_ecma_react_compiler fixture_cases_upstream_phase1 -- --nocapture` - `REACT_COMPILER_FIXTURE_CONTINUE_ON_FAIL=1 cargo test -p swc_ecma_react_compiler fixture_cases_upstream -- --nocapture` - `cargo test -p swc_ecma_react_compiler` Current fixture snapshot (continue-on-fail): - `1022/1718 failed` - `output_mismatch: 835` - `missing_error: 150` - `error_fragment_mismatch: 37` Baseline from plan text: - `1029/1718 failed` - `output_mismatch: 835` - `missing_error: 163` - `error_fragment_mismatch: 31` ## Notes - `fixture_cases_upstream` is still red; this PR intentionally focuses on M1 and initial pipeline parity pieces. - Remaining work is primarily M2+ clusters (reactive-scope dependency propagation / reduce-reactive-deps / new-mutability and other placeholder passes).
main
10 hours ago
style: fix rustfmt output in program pipeline gating
kdy1/react-compiler-m1-finalize
11 hours ago
fix
Austaras:main
14 hours ago
Create rude-candles-shout.md
kdy1/fix-11742-decorator-globalthis-regression
15 hours ago
test(minifier): add regression fixtures for issue 11645
Austaras:main
20 hours ago
test(minifier): add issue 11645 call-arity regression fixtures
Austaras:main
1 day ago
fix(es/parser): close remaining Flow parser gaps for #11729 (phase 2) (#11740) ## Summary - close the remaining RN Flow parser gaps tracked by #11729 - in Flow component *type* contexts, accept rest type forms like `...AnimatedProps<Props>`, `...Props<any, T>`, and `...{ ... }` - preserve non-declare component declaration behavior (`component Foo(...rest) {}`) by keeping named-rest parsing there - allow anonymous typed params in Flow signature/member contexts (including nested function-type params) while still preferring named-param parsing when `:`, `?`, or `=` markers are present - prevent decorator parsing from consuming `@@...` in Flow mode and parse `@@ident` keys as string keys (`"@@ident"`) - add Flow fixtures for phase 2 coverage under `crates/swc_ecma_parser/tests/flow/issue-11729-phase2` ## Testing - `git submodule update --init --recursive` - `UPDATE=1 cargo test -p swc_ecma_parser` - `cargo test -p swc_ecma_parser` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` - `cargo test -p swc_ecma_parser --features flow --test flow -- --ignored` --- Closes #11729
main
2 days ago
fix(parser): parse flow component rest types in type context
kdy1/fix-11729-phase2
3 days ago
Latest Branches
CodSpeed Performance Gauge
0%
feat(react-compiler): M1 memo validators + lint gating alignment
#11739
11 hours ago
e6a6274
kdy1/react-compiler-m1-finalize
CodSpeed Performance Gauge
0%
feat(es/minifier): Remove useless arguments for non inlined callee
#11645
14 hours ago
a156dcc
Austaras:main
CodSpeed Performance Gauge
0%
fix(decorators): scope 2023-11 implicit-global rewrite to decorator-lifted exprs
#11743
15 hours ago
84ff3e8
kdy1/fix-11742-decorator-globalthis-regression
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs