Skip to content

fix(parser): handle ASI after let followed by a reserved word on the next line - #18432

Merged
JLHwung merged 2 commits into
7.xfrom
automation/backport-18409
Oct 27, 2026
Merged

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

Conversation

@babel-bot

Copy link
Copy Markdown
Collaborator

Backport of #18409 to 7.x

Cherry-picked commits:

Conflicts: Resolved.

  • packages/babel-parser/src/parser/statement.ts: conflict in parseExportDeclaration's final return. Kept the 7.x return type (N.Declaration) and added the new export let branch from the PR.
  • eslint/babel-eslint-parser/test/typescript-estree.test.js: 7.x wraps the suite in an ESLint 9-only describe (different indentation), so I re-applied the PR's intent by hand: per-test sourceType/jsx/file extension passed to ts-estree, and removed the now-unneeded tsx-mode failure exclusions. 7.x-only entries were kept.

Fix commit: Fix enum fixture output after backporting #18409. The new fixture typescript/enum/let-with-linebreak/output.json was generated on main, where TSEnumDeclaration has a body (TSEnumBody). On 7.x it uses members, so I regenerated it.

Checks:

  • build (rebuild): passed.
  • lint: make lint-ci check-compat-data failed for environment reasons (tsc/eslint ran out of memory, no network to clone compat-table, jiti missing). I could not verify lint.
  • test: the full suite passes apart from babel-code-frame/test/color-detection.js and babel-core/test/errors-stacks.js. Both are unrelated to this change and appear to be caused by the environment (color/CI settings).

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 #18409 · copilot · auto · 28.7 AIC · ⌖ 0.879 AIC · ⊞ 9.1K · ◷

@babel-bot

Copy link
Copy Markdown
Collaborator Author

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: e0dc564

@JLHwung
JLHwung merged commit 6b35e5f into 7.x Oct 27, 2026
119 checks passed
@JLHwung
JLHwung deleted the automation/backport-18409 branch October 27, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

2 participants