Skip to content

fix(traverse): do not evaluate destructured bindings in path.evaluate - #18281

Merged
nicolo-ribaudo merged 1 commit into
7.xfrom
automation/backport-18250
Oct 5, 2026
Merged

nicolo-ribaudo merged 1 commit into
7.xfrom
automation/backport-18250

Conversation

@babel-bot

Copy link
Copy Markdown
Collaborator

Backport of #18250 to 7.x

Cherry-picked commits:

  • f92e1af → fix(traverse): do not evaluate destructured bindings in path.evaluate

Conflicts: Resolved.

  • packages/babel-traverse/test/evaluation.js: the new test was added next to two tests ("Math shadowed" / "standard global objects") that exist only on main. I kept only the new "should deopt for destructured bindings" test.

Checks: rebuild passed. Full test suite: 1 suite failed (babel-code-frame/test/color-detection.js, 6 tests), which is unrelated to this change and is environment-related (terminal color detection). lint: failed in the sandbox because check-compat-data needs to clone compat-table from GitHub (network certificate error); eslint couldn't be run separately either (missing jiti). The tsc check part had no reported errors.

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 #18250 · copilot · auto · 16.5 AIC · ⌖ 6.73 AIC · ⊞ 9K · ◷

@babel-bot

Copy link
Copy Markdown
Collaborator Author

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

commit: ee324ab

@nicolo-ribaudo
nicolo-ribaudo merged commit b1de971 into 7.x Oct 5, 2026
118 of 119 checks passed
@nicolo-ribaudo
nicolo-ribaudo deleted the automation/backport-18250 branch October 5, 2026 12:38
@nicolo-ribaudo nicolo-ribaudo added the PR: Bug Fix 🐛 A type of pull request used for our changelog categories label Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Sponsor
SponsoredKunjungi sekarang
Promo