Skip to content

Guard @@toPrimitive usage in toPrimitive helper - #18287

Merged
nicolo-ribaudo merged 2 commits into
7.xfrom
automation/backport-18284
Oct 6, 2026
Merged

nicolo-ribaudo merged 2 commits into
7.xfrom
automation/backport-18284

Conversation

@babel-bot

Copy link
Copy Markdown
Collaborator

Backport of #18284 to 7.x

Cherry-picked commits:

  • 9b7f37e → Guard @@toPrimitive usage in toPrimitive helper

Conflicts: None.

Fix commit: "Update fixtures after backporting #18284" regenerates fixtures that exist only on 7.x and embed the toPrimitive helper (babel-plugin-transform-runtime no-helpers fixtures for runtime, runtime-corejs2 and runtime-corejs3, and babel-preset-env corejs2-babel-7/usage-shippedProposals).

Checks: Rebuilt, then ran the full test suite. Only babel-code-frame/test/color-detection.js and babel-core/test/errors-stacks.js fail. They look environment-related and do not touch the helper, but I did not check them on 7.x. Lint fails in check-compat-data because the sandbox cannot clone compat-table (network certificate error). The lint run also hit an error in the eslint step that I did not investigate. Neither failure involves the backported change.

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 #18284 · copilot · auto · 27.9 AIC · ⌖ 9.8 AIC · ⊞ 9.1K · ◷

@babel-bot

babel-bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

commit: a70e837

@nicolo-ribaudo
nicolo-ribaudo marked this pull request as draft October 5, 2026 16:52
nicolo-ribaudo and others added 2 commits October 6, 2026 14:32
Regenerate 7.x-only fixtures embedding the toPrimitive helper.
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.

2 participants