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

Performance History

Latest Results

feat(es/parser): support Flow declare export default interface strip path (#11692) ## Summary This PR completes the remaining Flow strip parser gap for `declare export default interface ...`. ### What changed - Added a Flow-specific `declare export default` branch for `interface` in `swc_ecma_parser`. - Parses `declare export default interface Foo { ... }` as `Decl::TsInterface`, then marks it `declare` via the existing `make_decl_declare` path. - Kept existing fallback behavior for `declare export default <type>;` unchanged. - Added a new parser fixture suite: - `crates/swc_ecma_parser/tests/flow/declare-export-default-interface/basic.js` - Extended flow-strip e2e fixture input: - `crates/swc/tests/fixture/flow-strip/input/index.js` ## Scope notes - Intentionally **not** changing behavior for: - `declare export default opaque type ...` - semicolon-separated declare-export specifier lists like `declare export { Foo; Bar }` ## Testing - `git submodule update --init --recursive` - `UPDATE=1 cargo test -p swc_ecma_parser --test flow --features flow -- --ignored` - `cargo test -p swc_ecma_parser --test flow --features flow -- --ignored` - `UPDATE=1 cargo test -p swc --test projects -F flow -- --ignored flow_strip` - `cargo test -p swc --test projects -F flow -- --ignored flow_strip` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` - `cargo test -p swc_ecma_parser` - `cargo test -p swc` *(fails in `source_map` tests in this environment due missing Node module `sourcemap-validator`)*
main
48 minutes ago
feat(parser): support flow declare export default interface
kdy1/flow-strip-default-interface
1 hour ago
fix(decorators): align member ordering and refresh fixtures
kdy1/decorators-2023-11-babel-parity
2 hours ago
feat(es/parser): extend flow declare export strip compatibility (#11691) ## Summary This extends Flow strip compatibility in `swc_ecma_parser` for remaining `declare export` forms by normalizing type-only declarations into synthetic `TsTypeAlias` nodes. ### Parser changes - Added Flow `declare export` handling for: - `declare export { ... };` - `declare export { ... } from "...";` - `declare export * from "...";` - `declare export * as ns from "...";` - These declarations are normalized to synthetic aliases with unique ids: - `__flow_declare_export_<bytepos>` - Enhanced `declare export default` handling: - anonymous `function` / `async function` / `class` are now accepted and normalized to synthetic `__flow_default_export: any` - named default function/class behavior is preserved as `declare` declarations - `declare export default interface` remains unsupported ### Fixtures Added parser Flow fixtures: - `crates/swc_ecma_parser/tests/flow/declare-export-specifiers/basic.js` - `crates/swc_ecma_parser/tests/flow/declare-export-default-anon/basic.js` Expanded flow-strip input fixture: - `crates/swc/tests/fixture/flow-strip/input/index.js` ## Validation - `git submodule update --init --recursive` - `UPDATE=1 cargo test -p swc_ecma_parser --test flow --features flow -- --ignored` - `cargo test -p swc_ecma_parser --test flow --features flow -- --ignored` - `UPDATE=1 cargo test -p swc --test projects -F flow -- --ignored flow_strip` - `cargo test -p swc --test projects -F flow -- --ignored flow_strip` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` - `cargo test -p swc_ecma_parser`
main
2 hours ago
feat(es/parser): extend flow declare export strip compatibility
kdy1/flow-strip-declare-export-compat
3 hours ago
fix(decorators): gate 2023-11 class-alias rewrites
kdy1/decorators-2023-11-babel-parity
4 hours ago

Active Branches

feat(es/proposal): add decorators 2023-11 support#11686
last run
2 hours ago
CodSpeed Performance Gauge
0%
CodSpeed Performance Gauge
0%
CodSpeed Performance Gauge
0%
© 2026 CodSpeed Technology
Home Terms Privacy Docs