Skip to content

Respect importInterop: none for dynamic import - #18597

Merged
JLHwung merged 2 commits into
7.xfrom
automation/backport-18589
Nov 11, 2026
Merged

JLHwung merged 2 commits into
7.xfrom
automation/backport-18589

Conversation

@babel-bot

Copy link
Copy Markdown
Collaborator

Caution

Protected files were modified in this change.
This pull request is in request-review mode and requires explicit human scrutiny before merge.

Protected files: package.json, yarn.lock

Backport of #18589 to 7.x

Cherry-picked commits:

Conflicts: Resolved.

  • packages/babel-helper-module-transforms/src/index.ts: 7.x still has noInterop destructured as a parameter (main reads it from arguments[1]); kept the 7.x form. Only the @deprecated doc comment was taken.
  • packages/babel-plugin-transform-modules-amd/src/index.ts: 7.x had the old noInterop-based dynamic import code; took the new shouldSkipInteropHelper-based logic and the importInterop = options.noInterop ? "none" : "babel" default.
  • packages/babel-plugin-transform-modules-commonjs/src/dynamic-import.ts: transformDynamicImport now takes importInterop instead of the noInterop boolean, as in the original PR.

Fix commit: "Fix tests for 7.x after backporting #18589"

  • options.js fixtures in babel-plugin-transform-dynamic-import use module.exports plus a package.json with "type": "commonjs", because that package is ESM on 7.x and the fixture loader uses require.
  • Inline snapshots in the AMD/CommonJS importInterop-function.js tests were regenerated, because 7.x's Jest escapes quotes.

Checks:

  • Build: passed.
  • Tests: all pass except babel-code-frame/test/color-detection.js, which is unrelated (environment).
  • Lint: check-compat-data could not run because the sandbox blocks cloning compat-table (SSL), and tsc reports errors in babel-types/scripts/generators (also unrelated). Prettier passed.
  • The new tests need @babel/plugin-transform-dynamic-import linked as a workspace dependency, which this sandbox lacked (no install). I linked it temporarily to verify, then restored it. The package.json and yarn.lock changes are included from the original PR.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

Generated by 🔙 Backport to 7.x for #18589 · copilot · auto · 38.7 AIC · ⌖ 0.717 AIC · ⊞ 9.4K · ◷

nicolo-ribaudo and others added 2 commits November 11, 2026 18:58
Use CommonJS options.js fixtures and 7.x snapshot escaping.

@babel-bot babel-bot left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Protected files were modified in this pull request and require manual scrutiny before merge.

Please verify that each protected-file change is intentional, policy-compliant, and safe:

  • Protected files: package.json, yarn.lock

@babel-bot babel-bot added PR: Bug Fix 🐛 A type of pull request used for our changelog categories area: modules labels Nov 11, 2026
@babel-bot

Copy link
Copy Markdown
Collaborator Author

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

@pkg-pr-new

pkg-pr-new Bot commented Nov 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 428683c

@JLHwung
JLHwung added this pull request to the merge queue Nov 11, 2026
Merged via the queue into 7.x with commit 175d46f Nov 11, 2026
69 checks passed
@JLHwung
JLHwung deleted the automation/backport-18589 branch November 11, 2026 19:34
markharding pushed a commit to futo-org/Harbor that referenced this pull request Nov 17, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@babel/runtime](https://babel.dev/docs/en/next/babel-runtime) ([source](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime)) | [`7.29.13` → `7.29.14`](https://renovatebot.com/diffs/npm/@babel%2fruntime/7.29.13/7.29.14) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@babel%2fruntime/7.29.14?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@babel%2fruntime/7.29.13/7.29.14?slim=true) |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/2097) for more information.

---

### Release Notes

<details>
<summary>babel/babel (@&#8203;babel/runtime)</summary>

### [`v7.29.14`](https://github.com/babel/babel/releases/tag/v7.29.14)

[Compare Source](babel/babel@v7.29.13...v7.29.14)

#### v7.29.14 (2026-11-11)

##### 👓 Spec Compliance

- `babel-parser`
  - [#&#8203;18543](babel/babel#18543) fix(parser): require `(` after `import.{source,defer,sync}` ([@&#8203;babel-bot](https://github.com/babel-bot))

##### 🐛 Bug Fix

- `babel-helper-module-transforms`, `babel-plugin-transform-dynamic-import`, `babel-plugin-transform-modules-amd`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-modules-umd`
  - [#&#8203;18597](babel/babel#18597) Respect `importInterop: none` for dynamic import ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-helper-member-expression-to-functions`, `babel-plugin-transform-classes`, `babel-plugin-transform-object-super`, `babel-plugin-transform-private-methods`
  - [#&#8203;18595](babel/babel#18595) Keep the receiver of TS-wrapped `super` and private member calls ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-parser`
  - [#&#8203;18596](babel/babel#18596) fix(parser): allow ASI between modifier-like field and [@&#8203;dec](https://github.com/dec) ([@&#8203;babel-bot](https://github.com/babel-bot))
  - [#&#8203;18588](babel/babel#18588) fix(parser): rework ts arrow param tracking ([@&#8203;babel-bot](https://github.com/babel-bot))
  - [#&#8203;18542](babel/babel#18542) fix(parser): handle async do await in parameters ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-helper-string-parser`, `babel-parser`
  - [#&#8203;18591](babel/babel#18591) fix(parser): recover from out-of-range `\u{...}` code points ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-generator`
  - [#&#8203;18585](babel/babel#18585) fix(generator): keep parens that end an optional chain before ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-plugin-transform-class-static-block`
  - [#&#8203;18579](babel/babel#18579) fix(class-static-block): skip class body path with stale ancestry ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-helper-module-transforms`, `babel-parser`, `babel-plugin-transform-modules-commonjs`, `babel-plugin-transform-react-pure-annotations`, `babel-plugin-transform-typescript`, `babel-traverse`, `babel-types`
  - [#&#8203;18574](babel/babel#18574) fix: improve string module specifiers support ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-plugin-transform-flow-comments`
  - [#&#8203;18573](babel/babel#18573) fix(flow-comments): support anonymous classes ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-plugin-transform-block-scoping`, `babel-traverse`
  - [#&#8203;18571](babel/babel#18571) fix: rename assignment targets in forXStatement ([@&#8203;babel-bot](https://github.com/babel-bot))
- `babel-helpers`, `babel-plugin-transform-async-generator-functions`, `babel-plugin-transform-regenerator`, `babel-preset-env`, `babel-runtime-corejs3`
  - [#&#8203;18569](babel/babel#18569) fix(regenerator): dispatch pending jump after finally to outer finally blocks ([@&#8203;babel-bot](https://github.com/babel-bot))

##### 🏠 Internal

- [#&#8203;18575](babel/babel#18575) ci: do not run hooks of skipped describe blocks on Jest 24 ([@&#8203;JLHwung](https://github.com/JLHwung))

##### Committers: 2

- Babel Bot ([@&#8203;babel-bot](https://github.com/babel-bot))
- Huáng Jùnliàng ([@&#8203;JLHwung](https://github.com/JLHwung))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 9am on tuesday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yMjcuNCIsInVwZGF0ZWRJblZlciI6IjQ0LjIyNy40IiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiLCJyZW5vdmF0ZSJdfQ==-->

Reviewed-on: https://code.futo.org/harbor/harbor/pulls/2332
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

7.x: backport area: modules 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.

3 participants