Skip to content

fix: handle TSInstantiation before < - #18724

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

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

Conversation

@babel-bot

Copy link
Copy Markdown
Collaborator

Backport of #18658 to 7.x

Cherry-picked commits:

  • 0a06c30 → fix: handle TSInstantiation before <

Conflicts: Resolved.

  • packages/babel-generator/src/generators/expressions.ts: 7.x keeps the typeParameters/optional check in NewExpression's omitArguments; kept it and added the new TSInstantiationExpression callee condition.
  • packages/babel-generator/src/node/parentheses.ts: 7.x uses the BABEL_8_BREAKING ? typeArguments : typeParameters check; kept that and added the new comment and the callee/TaggedTemplateExpression cases.
  • packages/babel-generator/test/helpers/roundtrip.js: kept the existing 7.x-only entry (decorator createParenthesizedExpression) and added the new fixture entries.

Fix commit: "Fix parser fixtures after backporting #18658": the three new parser fixtures' output.json used Babel 8's typeArguments; regenerated for the Babel 7 AST (typeParameters).

Checks: rebuild, lint passed (no leftover changes). Full test suite: only packages/babel-code-frame/test/color-detection.js fails (6 tests), unrelated to this backport (color detection of the environment); everything else passes.

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 #18658 · copilot · auto · 25 AIC · ⌖ 0.752 AIC · ⊞ 9.4K · ◷

JLHwung and others added 2 commits November 25, 2026 16:54
Regenerate Babel 7 AST output (typeParameters).
@babel-bot babel-bot added 7.x: backport PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: generator labels Nov 25, 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/63823

@pkg-pr-new

pkg-pr-new Bot commented Nov 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 08804a7

@JLHwung
JLHwung added this pull request to the merge queue Nov 25, 2026
Merged via the queue into 7.x with commit b7c4b11 Nov 25, 2026
46 checks passed
@JLHwung
JLHwung deleted the automation/backport-18658 branch November 25, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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