SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 117 JavaScript

[rust-compiler] Fix SWC type annotations, unicode escaping, object formatting, and IIFE handling

Comprehensive fixes for SWC e2e test failures:

1. Type declarations: extract TS/Flow type aliases, interfaces, and enums
   from original source text and inject into compiled output
2. Unicode escaping: use \uXXXX for non-ASCII characters in string literals
   and JSX attributes to match Babel codegen
3. Object formatting: expand single-line objects in FIXTURE_ENTRYPOINT blocks
4. IIFE/expression parenthesization: wrap arrow/function expressions used as
   call targets, wrap conditionals, wrap LogicalExpression/OptChainExpr
5. Negative zero: convert -0 to 0 to match Babel
6. Source normalization for uncompiled pass-through
7. Flow file support via TypeScript parser fallback

SWC e2e results: 1599 → 1633 passing.
J
Joe Savona committed
8f51441cbb08c79b736faebff95eb47b0019a0e6
Parent: 699a850