Repository navigation
fix(codegen): preserve default import names in source maps - #28058
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
Author
Merge activity
|
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.
graphite-app
Bot
force-pushed
the
fix/codegen-default-import-source-map
branch
from
October 21, 2026 23:58
20cef31 to
0e2934f
Compare
This was referenced Oct 26, 2026
Dunqing
added a commit
that referenced
this pull request
Oct 27, 2026
### 💥 BREAKING CHANGES - cf8296f ecmascript: [**BREAKING**] Fold surrogate strings with JSStr constants (#27098) (Dunqing) ### 🚀 Features - dd6cb2b minifier: Fold out-of-bounds string indices to `void 0` (#28004) (Dunqing) ### 🐛 Bug Fixes - f4dac9e semantic: Separate hoisted vars from block type bindings (#27936) (limadog9) - 9ec6617 minifier: Keep brackets on negative and non-finite numeric keys (#27855) (Yunus Ozen) - 520a26e minifier: Keep the default in shorthand assignment targets (#28183) (waltu) - def47b8 react-compiler: Keep manual memoization as written when its dependencies can't be honoured (#28101) (Dunqing) - 704d8cf transformer_plugins: Keep the bare inject when references to it remain (#26965) (Bharadwaj Pendyala) - 6d7b372 minifier: Handle sequence exprs when folding if to expr statement (#27939) (Armano) - e3eca41 runtime: Align async iterator throw with Babel (#28059) (camc314) - af0258d parser: Parse source imports named type (#28062) (camc314) - 83633a7 parser: Parse escaped class field names after initializers (#28061) (camc314) - 90c58ac parser: Parse postfix updates of sloppy `let` identifiers (#28060) (camc314) - 0e2934f codegen: Preserve default import names in source maps (#28058) (camc314) - 09bdb80 minifier: Allow argument rewrite with with leading var assignments (#28056) (Armano) - ebcdcd9 minifier: Preserve rest destructuring side effects (#27981) (camc314) - 5c84098 semantic,linter: Report names with lone surrogates in enum and lint checks (#27991) (Dunqing) - bd70a9b ecmascript: Use ECMAScript whitespace when folding `parseFloat`/`parseInt`/`trim` (#27719) (Dunqing) - 4c0fa90 minifier,linter: Keep `delete` of constant members and later JSX keys (#27990) (Dunqing) ### ⚡ Performance - 3493ce3 minifier: Reuse is_error_constructor and simplify substitute_global_new_expression (#28149) (Armano) - a22c9f2 parser: Move annotation comment handling out of hot paths (#28139) (camc314) - 1ed93af data_structures: Copy short strings without a memcpy call (#27953) (leaysgur) ### 🛡️ Security - b93e169 deps: Bump .node-version to 26.12.1 (#28090) (leaysgur) Co-authored-by: Dunqing <29533304+Dunqing@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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. Stack: this fix targets
main; #28057 targets this branch.