fix(codegen): add missing dot when printing import.defer and import.source#13975
fix(codegen): add missing dot when printing import.defer and import.source#13975graphite-app[bot] merged 1 commit intomainfrom
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
There was a problem hiding this comment.
Pull Request Overview
Fixes a bug in JavaScript codegen where import.defer() and import.source() expressions were incorrectly generated without the required dot, producing invalid syntax like importdefer(). The fix adds the missing dot character and includes comprehensive test coverage.
- Added missing dot character between
importand phase keywords in ImportExpression codegen - Added test cases covering both minified and non-minified output for
import.defer()andimport.source()
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/oxc_codegen/src/gen.rs | Adds missing dot character in ImportExpression code generation |
| crates/oxc_codegen/tests/integration/js.rs | Adds test coverage for import phase expressions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Merge activity
|
CodSpeed Instrumentation Performance ReportMerging #13975 will not alter performanceComparing Summary
Footnotes |
…ource (#13975) ## Summary Fixes the codegen to correctly print `import.defer()` and `import.source()` expressions. Previously, the dot was missing, resulting in invalid syntax like `importdefer()` and `importsource()`. ## Changes - Added missing dot (`.`) between `import` and the phase (`defer` or `source`) in the ImportExpression code generation - Added test cases to verify both `import.defer()` and `import.source()` are correctly generated Closes #13971 🤖 Generated with [Claude Code](https://claude.ai/code)
e65ee4d to
8f3f460
Compare
Summary
Fixes the codegen to correctly print
import.defer()andimport.source()expressions. Previously, the dot was missing, resulting in invalid syntax likeimportdefer()andimportsource().Changes
.) betweenimportand the phase (deferorsource) in the ImportExpression code generationimport.defer()andimport.source()are correctly generatedCloses #13971
🤖 Generated with Claude Code