Skip to content

Make getFunctionParent skip decorators/keys - #18715

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

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

Conversation

@babel-bot

Copy link
Copy Markdown
Collaborator

Backport of #18633 to 7.x

Cherry-picked commits:

  • 9386c66 → Make getFunctionParent skip decorators/keys

Conflicts: Resolved.

  • packages/babel-traverse/src/path/ancestry.ts: the getFunctionParent signature differs on main (this: NodePath<t.Node | null>) versus 7.x (this: NodePath). I took the new implementation and kept the 7.x this: NodePath signature.

Checks: Rebuild passed. The full Jest suite had 6 failures, all in packages/babel-code-frame/test/color-detection.js (terminal color detection in the environment), unrelated to this change. Lint failed, but not because of this change: check-compat-data failed with a git error (exit 128), and there were 2 unused-eslint-disable warnings in babel-core files this PR doesn't touch. The tsc and type tests passed, including babel-traverse/test/index.tst.ts.

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 #18633 · copilot · auto · 15.1 AIC · ⌖ 0.599 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 labels Nov 24, 2026
@JLHwung
JLHwung enabled auto-merge November 24, 2026 19:31
@babel-bot

babel-bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

Assisted-by: Claude Opus 5.5
@pkg-pr-new

pkg-pr-new Bot commented Nov 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: 89f2a56

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

Labels

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