mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
cf4b7d7402
JavaScript strings can contain lone UTF-16 surrogates. Keep their full values through parsing, semantic analysis, transforms, linting, and output instead of losing names at fallible UTF-8 views. Build on the separate StaticName API preparation. Preserve canonical WTF-8 through syntax consumers and convert explicitly at UTF-8 output, identifier, pattern, and resolver boundaries. Keep enum constants in owned UTF-16 storage without adding a general owned JSString. Retain JSX character-reference output, generated CI files, and the consumer regressions. The prerequisite isolates the property-name API review and preserves allocation counts when formatting UTF-8 names. Part of #26242. Implemented with AI assistance.