Skip to content

fix: rename assignment targets in forXStatement - #18571

Merged
JLHwung merged 1 commit into
7.xfrom
automation/backport-18562
Nov 10, 2026
Merged

JLHwung merged 1 commit into
7.xfrom
automation/backport-18562

Conversation

@babel-bot

Copy link
Copy Markdown
Collaborator

Backport of #18562 to 7.x

Cherry-picked commits:

Conflicts: Resolved.

  • packages/babel-traverse/src/scope/lib/renamer.ts: on main the rename visitor is wrapped in getRenameVisitor()/explode, while 7.x uses a plain renameVisitor object. I kept the 7.x structure and applied the same change to the AssignmentExpression|Declaration|VariableDeclarator visitor (adding ForXStatement and using getAssignmentIdentifiers for it).

Checks: rebuild and lint passed. The full test suite passed except 6 tests in packages/babel-code-frame/test/color-detection.js, which fail on ANSI color detection in this environment. They are unrelated to this change, so I did not fix them.

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 #18562 · copilot · auto · 18.2 AIC · ⌖ 0.622 AIC · ⊞ 9.4K · ◷

@babel-bot babel-bot added 7.x: backport PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: traverse (scope) labels Nov 10, 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/63127

@pkg-pr-new

pkg-pr-new Bot commented Nov 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 04c17a5

@JLHwung
JLHwung added this pull request to the merge queue Nov 10, 2026
Merged via the queue into 7.x with commit 2aa4ade Nov 10, 2026
69 checks passed
@JLHwung
JLHwung deleted the automation/backport-18562 branch November 10, 2026 16:08
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 pkg: traverse (scope) 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.

2 participants