swc-project
swc
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix(react-compiler): react compiler AST conversion for wrapped assignment targets (#11952) **Description:** This updates swc_ecma_react_compiler AST conversion to avoid panicking on SWC assignment target shapes that are valid in the SWC AST but were previously treated as unreachable. This PR also marks `::Invalid` unreachable instead of `__invalid__` ident placeholder to turn runtime error into compile time error. Although some of these syntaxes are still not supported by React Compiler. They should surface as recoverable React Compiler diagnostics instead of crashing during SWC-to-React-Compiler AST conversion via `unreachable!.` **Related issue:** https://github.com/web-infra-dev/rspack/issues/14511
main
8 hours ago
refactor: remove convert_invalid_ident
06-20-fix/convert-ast
11 hours ago
refactor: returns Option
06-20-fix/convert-ast
13 hours ago
refactor: returns Option
06-20-fix/convert-ast
14 hours ago
refactor(es/react-compiler): Preserve TS metadata during AST roundtrip (#11950) **Description:** This PR improves TypeScript metadata preservation in the React Compiler AST roundtrip. React Compiler's AST does not losslessly represent several SWC TypeScript fields, so reverse conversion now restores those fields from explicitly preserves SWC shells first and uses RawNode parsing only as a cold fallback. Main changes: - Preserve typed catch clause parameters during forward conversion and restore them in reverse conversion. - Replace separate JSX opening/new/tagged type-argument shells with a shared `TsOptionalInstantiation`. - Split TS instantiation metadata out of `TsExprShell`, and simplify `TsExprShell` to wrapper span plus type annotation. - Remove the generic `load_ts_expr_for_span` post-pass; TS expression wrappers now restore their own preserved metadata in their concrete branches. - Convert pattern-like nodes without type annotations on the hot path, then fill top-level TS metadata from preserved AST or cold RawNode fallback. - Improve `TSDeclareFunction` fallback params by recovering raw identifier/rest names, optional flags, and top-level type annotations instead of placeholder params. - Restore preserved TS module-like items directly instead of rebuilding module ids from RawNode JSON.
main
15 hours ago
chore: Add changeset for react compiler TS metadata
refactor/react-compiler
15 hours ago
fix(es/es2022): Correct scope for private property brand checks (#11953) **Description:** This PR fixes a bug where `WeakSet` instances generated for `#field in object` brand checks were accidentally scoped to the closest following block statement (often a sibling class constructor) rather than the parent module scope. The bug was caused by a state leakage in `PrivatePropertyInObjectPass`. AST traversal would accumulate `self.vars` across classes and unconditionally dump them into the very next `exit_stmts` hook it encountered. I resolved this by introducing a `vars_stack` to the pass, pushing a fresh scope upon entering a block/module, and popping it on exit. This ensures injected variables strictly stay within the AST scope they were generated in. **Testing:** I have added a test fixture containing the exact reproduction code and configuration from #11931. The baseline output correctly places the `var _brand_check_x = new WeakSet();` outside of the child class scope. **Related issue:** - Closes #11931
main
15 hours ago
fix(react-compiler): avoid reporting non-fatal success errors as diagnostics (#11951) ## Summary Avoid converting error-level React Compiler logger events from `CompileResult::Success` into SWC diagnostics. React Compiler can preserve `CompileError` logger events while still returning `CompileResult::Success`, for example when `panicThreshold` is `none`. Those events should remain available on the transform result, but should not become SWC diagnostics that fail compilation. Warning and hint events from successful results are still surfaced as SWC warnings. Fatal results (`CompileResult::Error`) keep the existing diagnostic behavior. **Related issue:** - https://github.com/web-infra-dev/rspack/issues/14517
main
15 hours ago
Latest Branches
CodSpeed Performance Gauge
0%
fix(react-compiler): react compiler AST conversion for wrapped assignment targets
#11952
12 hours ago
80aaa06
06-20-fix/convert-ast
CodSpeed Performance Gauge
0%
refactor(es/react-compiler): Preserve TS metadata during AST roundtrip
#11950
15 hours ago
9de8ac9
refactor/react-compiler
CodSpeed Performance Gauge
0%
fix(es/es2022): Correct scope for private property brand checks
#11953
16 hours ago
e1f492b
Kaus1ubh:fix-brand-check-scope
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs