Visitar URL original
fix(parser): set phase: null for non-deferred imports with deferredImportEvaluation (#18313) by bhushan4work · Pull Request #18392 · babel/babel · GitHub
Skip to content

fix(parser): set phase: null for non-deferred imports with deferredImportEvaluation (#18313) - #18392

Merged
nicolo-ribaudo merged 1 commit into
babel:mainfrom
bhushan4work:fix#18313
Oct 23, 2026
Merged

nicolo-ribaudo merged 1 commit into
babel:mainfrom
bhushan4work:fix#18313

Conversation

@bhushan4work

Copy link
Copy Markdown

Description

Q A
Fixed Issues? Fixes #18313
Patch: Bug Fix? Yes
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? Yes
Documentation PR Link N/A
Any Dependency Changes? No
Need backport? No
License MIT

ok so when deferredImportEvaluation is enabled, set phase: null on ImportDeclaration nodes that dontt really use the deferred imports, matching the existing sourcePhaseImports behaviour

thereby i basically added a regression fix which kinda covers default, namespace, named, and defer-named imports

it then concluded that all 6,082 parser tests had been run 6,080 of them passed, 2 were skipped and none failed and finally the ts, eslint, and prettier checks had also passed

@github-actions

Copy link
Copy Markdown

Thanks for opening this pull request! 🎉

We really appreciate you taking the time to contribute, @bhushan4work.

A maintainer will take a look as soon as they can. In the meantime, please make sure that:

  • the description explains what changed and why
  • any related issues are linked
  • existing tests still pass

If anything needs adjusting we'll leave comments here. Thanks again!

@babel-bot

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/62463

@pkg-pr-new

pkg-pr-new Bot commented Oct 22, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 20f7e2d

@nicolo-ribaudo nicolo-ribaudo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@nicolo-ribaudo nicolo-ribaudo added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: parser labels Oct 22, 2026

@liuxingbaoyu liuxingbaoyu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nicolo-ribaudo
nicolo-ribaudo merged commit 44e867b into babel:main Oct 23, 2026
72 checks passed
@babel-bot

Copy link
Copy Markdown
Collaborator

Backported to 7.x in #18446.

JLHwung pushed a commit that referenced this pull request Oct 29, 2026
…portEvaluation (#18313) (#18446)

fix(parser): set `phase: null` for eafer imports (#18392)

backport of 44e867b

Co-authored-by: Bhushan Agrawal <bhushan.agrawal4work@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deferredImportEvaluation does not set phase: null on non-deferred imports

5 participants