mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
Default imports with escaped identifiers (for example, `import s\u006furce from "./a.js"`) lose their original spelling from JS codegen source maps. The default-import printer records an unnamed mapping for the specifier instead of a named mapping for its local identifier. Use the same named identifier mapping as the other import forms. Add regressions for default imports, type-only imports, and defaults combined with named or namespace imports; each compares code and complete source maps against Rust in both parenthesis modes. Exposed by the TypeScript fixture update in #28057 and [this failed CI job](https://github.com/oxc-project/oxc/actions/runs/39690771786/job/119536110779). Stack: this fix targets `main`; #28057 targets this branch.