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

Performance History

Latest Results

Revert changes
cuyl:handle-undefined-args-for-toprecision
11 hours ago
perf(typescript): gate flow await normalization by syntax
kdy1/flow-strip-hermes-await-normalization
15 hours ago
refactor: Simplify `get_first_arg`
cuyl:handle-undefined-args-for-toprecision
15 hours ago
fix(flow): normalize await bindings in module strip output
kdy1/flow-strip-hermes-await-normalization
16 hours ago
feat(es/parser): complete Hermes Flow stripping parity (#11702) ## Summary This PR completes Hermes-based Flow stripping parity by extending parser support and adding strip correctness coverage for Hermes corpus cases. ### What changed - Extended Flow syntax flags/options in parser config: - `decorators` - `components` - `pattern_matching` - Updated Hermes Flow options loader to read: - `esproposal_decorators` - `components` - `pattern_matching` - plus fallback enablement for `match/*`, `components/*`, and `hook_syntax/*` fixtures. - Implemented Flow `component`/`hook` parsing with lowering to existing AST nodes: - declaration forms (`component`, `hook`, `declare component`, export forms) - type forms (`component (...) renders T`, `hook (...) => T`) - Implemented Flow `match` parsing and lowering (statement + expression paths) under `pattern_matching`: - supports Hermes corpus pattern forms (literal/unary literal, wildcard, bindings, object/array, `|`, `as`, guard) - expression lowering includes non-exhaustive fallback throw. - Added Hermes strip correctness test: - `crates/swc/tests/flow_strip_hermes.rs` - checks `expected-errors=false` fixtures, `IsModule::Unknown`, no `__flow_` leakage, ES reparse success - supports strip-known-fail list + stale known-fail detection. - Added strip known-fail file with agreed 2 cases: - `async_await/migrated_0020.js` - `async_await/migrated_0024.js` - Emptied Hermes parser `known-fail.txt` and updated sync script to stop category-based known-fail generation. ## Verification Executed locally: - `git submodule update --init --recursive` - `cargo test -p swc_ecma_parser --test flow_hermes --features flow` - `cargo test -p swc --test flow_strip_hermes --features flow` - `cargo test -p swc --test flow_strip_correctness --features flow -- --ignored` - `cargo test -p swc_ecma_parser` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` Additional note: - `cargo test -p swc` was also run, but `tests/source_map.rs::issue_622` failed due `sourcemap-validator` runtime assertion (`There were no mappings in the file`) in local environment; this appears unrelated to the Flow/Hermes parser-strip changes.
main
17 hours ago
fix(parser): scope leading-decorator check to flow decorators
kdy1/flow-hermes-stripping-parity
18 hours ago

Active Branches

fix(es/minifier): Handle `toExponential(undefined)`#11583
last run
11 hours ago
CodSpeed Performance Gauge
0%
CodSpeed Performance Gauge
0%
CodSpeed Performance Gauge
0%
© 2026 CodSpeed Technology
Home Terms Privacy Docs