Repository navigation
fix: closures in for-loop test and update capture wrong binding - #18441
Merged
Merged
Conversation
Remove non-null assertions unnecessary with 7.x types and regenerate the Annex B fixture output, which differs on 7.x.
Collaborator
Author
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/62671 |
|
commit: |
Contributor
|
@copilot Add |
Contributor
Added |
Co-authored-by: JLHwung <[email protected]>
JLHwung
force-pushed
the
automation/backport-18371
branch
from
October 29, 2026 13:15
0c050cb to
0b05587
Compare
This was referenced Nov 6, 2026
1 task
This was referenced Nov 20, 2026
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.
Backport of #18371 to 7.x
Cherry-picked commits:
Conflicts: Resolved.
packages/babel-plugin-transform-block-scoping/src/index.ts:mainhad the Babel 8isVarInForStatementInitimport and a differently structured/indented visitor (merged withannexB33FunctionsVisitor). I kept the 7.x file and only added themoveCapturingTestAndUpdateIntoBodyimport and call.Fix commit: "Fix lint and fixture output after backporting #18371"
src/loop.ts: removed non-null assertions flagged by eslint (no-unnecessary-type-assertion) since 7.x types differ.test/fixtures/general/for-test-closure-function-in-body/output.js: regenerated, as 7.x Annex B handling emitsvar _g = function () {}; g = _g;.Checks:
tscheckran. The fullmake lint-ci check-compat-datafailed only becausecheck-compat-datacannot clone compat-table (no network/cert error).babel-code-framecolor-detection tests, unrelated to this PR (environment related). All else passed.Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
github.comTo allow these domains, add them to the
network.allowedlist in your workflow frontmatter:See Network Configuration for more information.