swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
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
ci: optimize cargo-test matrix with cargo mono changed (#11681) ## Summary - optimize only the cargo-test matrix in CI using cargo mono changed - keep full matrix for push to main - when no crates are affected: run full matrix on infra changes, otherwise run a single __noop__ entry - add safe fallback to full matrix if cargo mono changed fails ## Changes - update .github/workflows/CI.yml - list-cargo-tests: add fetch-depth: 0 and install cargo-mono@0.5.0 - cargo-test: add noop step and guard expensive steps with crate != __noop__ - update scripts/github/get-test-matrix.mjs - use GitHub env (GITHUB_EVENT_NAME, GITHUB_BASE_REF, GITHUB_REF) - full matrix on push to main - otherwise compute changed crates via cargo mono --output json changed --base origin/<base> - add infra-path fallback and noop sentinel output ## Verification - node --check scripts/github/get-test-matrix.mjs - git diff --check -- .github/workflows/CI.yml scripts/github/get-test-matrix.mjs
main
1 hour 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
feat(es/react-compiler): phase1 crate API baseline and fixture harness (#11690) ## Summary - enforce Phase 1 supported option surface in `parse_plugin_options` (`client + infer + target=19`) and return explicit `Config` errors for unsupported modes - wire initial reactive-scope codegen for component/hook return memoization with cache-slot runtime calls - add upstream Phase 1 manifest (`100` fixtures) and update fixture sync tooling to be manifest-driven - expand fixture harness with pragma option parsing, TS/TSX parsing, normalized expected/actual comparison, and error-category checks ## Scope Notes - keeps the work in `swc_ecma_react_compiler` crate API (`compile_program` / `compile_fn`) - does not change `@swc/core`, `@swc/types`, or `swcrc` public surface in this phase ## Testing - `git submodule update --init --recursive` - `cargo fmt --all` - `cargo clippy --all --all-targets -- -D warnings` - `cargo test -p swc_ecma_react_compiler`
main
4 hours ago
Active Branches
feat(es/proposal): add decorators 2023-11 support
#11686
last run
2 hours ago
CodSpeed Performance Gauge
0%
perf(swc_ecma_parser): reduce TS arrow param clone/reparse churn
#11678
last run
4 days ago
CodSpeed Performance Gauge
0%
perf(react): fix hotspots in swc_ecma_transforms_react (#11654)
#11674
last run
4 days ago
CodSpeed Performance Gauge
0%
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs