Skip to content

fix(runtime): align async iterator throw with Babel - #28059

Merged
graphite-app[bot] merged 1 commit into
mainfrom
fix/runtime-async-from-sync-throw
Oct 22, 2026
Merged

graphite-app[bot] merged 1 commit into
mainfrom
fix/runtime-async-from-sync-throw

Conversation

@camc314

@camc314 camc314 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Async-from-sync .throw(error) currently looks up the sync iterator's return method. Change that lookup to throw in both CommonJS and ESM helpers, matching Babel's implementation.

The upstream yield-star/throw-method-sync-iterator regression added in #28057 now passes; update its execution snapshot. just test-transform reproduces the expected results: 320/418 Babel execution tests and 40/42 local execution tests, with no new failures. Direct delegation checks also pass for both helper formats.

Copilot AI balanced review requested due to automatic review settings October 22, 2026 00:03
@camc314
camc314 requested a review from Dunqing as a code owner October 22, 2026 00:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T18:22:04.550090Z cf22910 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2146b1a3d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread npm/runtime/test/asyncIterator.test.cjs Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a1d8156fb6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@camc314
camc314 force-pushed the fix/runtime-async-from-sync-throw branch from a1d8156 to 516e424 Compare October 22, 2026 00:17

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 516e424306

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions github-actions Bot added the A-transformer Area - JS/TS transforms and downleveling, oxc_transformer label Oct 22, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b2c837f63d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

camc314 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

The completion-flag finding is fixed in 073a42e, with coverage for both helper variants. Please recheck the latest commit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 073a42e30f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

camc314 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

50eaf07 fixes the intrinsic-call finding and covers poisoned call properties for both delegation and cleanup. Full coverage and the focused execution fixture pass. Please recheck the latest commit.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 50eaf07993

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@camc314 camc314 changed the title fix(runtime): forward async-from-sync throw to the sync iterator fix(runtime): align async iterator throw with Babel Oct 22, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Oct 22, 2026

camc314 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Merge activity

Async-from-sync `.throw(error)` currently looks up the sync iterator's `return` method. Change that lookup to `throw` in both CommonJS and ESM helpers, matching [Babel's implementation](https://github.com/babel/babel/blob/main/packages/babel-helpers/src/helpers/asyncIterator.ts).

The upstream `yield-star/throw-method-sync-iterator` regression added in #28057 now passes; update its execution snapshot. `just test-transform` reproduces the expected results: 320/418 Babel execution tests and 40/42 local execution tests, with no new failures. Direct delegation checks also pass for both helper formats.
@graphite-app
graphite-app Bot force-pushed the fix/runtime-async-from-sync-throw branch from cf22910 to e3eca41 Compare October 22, 2026 19:27
@graphite-app
graphite-app Bot merged commit e3eca41 into main Oct 22, 2026
32 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Oct 22, 2026
@graphite-app
graphite-app Bot deleted the fix/runtime-async-from-sync-throw branch October 22, 2026 19:47
Dunqing added a commit that referenced this pull request Oct 27, 2026
### 💥 BREAKING CHANGES

- cf8296f ecmascript: [**BREAKING**] Fold surrogate strings with JSStr
constants (#27098) (Dunqing)

### 🚀 Features

- dd6cb2b minifier: Fold out-of-bounds string indices to `void 0`
(#28004) (Dunqing)

### 🐛 Bug Fixes

- f4dac9e semantic: Separate hoisted vars from block type bindings
(#27936) (limadog9)
- 9ec6617 minifier: Keep brackets on negative and non-finite numeric
keys (#27855) (Yunus Ozen)
- 520a26e minifier: Keep the default in shorthand assignment targets
(#28183) (waltu)
- def47b8 react-compiler: Keep manual memoization as written when its
dependencies can't be honoured (#28101) (Dunqing)
- 704d8cf transformer_plugins: Keep the bare inject when references to
it remain (#26965) (Bharadwaj Pendyala)
- 6d7b372 minifier: Handle sequence exprs when folding if to expr
statement (#27939) (Armano)
- e3eca41 runtime: Align async iterator throw with Babel (#28059)
(camc314)
- af0258d parser: Parse source imports named type (#28062) (camc314)
- 83633a7 parser: Parse escaped class field names after initializers
(#28061) (camc314)
- 90c58ac parser: Parse postfix updates of sloppy `let` identifiers
(#28060) (camc314)
- 0e2934f codegen: Preserve default import names in source maps (#28058)
(camc314)
- 09bdb80 minifier: Allow argument rewrite with with leading var
assignments (#28056) (Armano)
- ebcdcd9 minifier: Preserve rest destructuring side effects (#27981)
(camc314)
- 5c84098 semantic,linter: Report names with lone surrogates in enum and
lint checks (#27991) (Dunqing)
- bd70a9b ecmascript: Use ECMAScript whitespace when folding
`parseFloat`/`parseInt`/`trim` (#27719) (Dunqing)
- 4c0fa90 minifier,linter: Keep `delete` of constant members and later
JSX keys (#27990) (Dunqing)

### ⚡ Performance

- 3493ce3 minifier: Reuse is_error_constructor and simplify
substitute_global_new_expression (#28149) (Armano)
- a22c9f2 parser: Move annotation comment handling out of hot paths
(#28139) (camc314)
- 1ed93af data_structures: Copy short strings without a memcpy call
(#27953) (leaysgur)

### 🛡️ Security

- b93e169 deps: Bump .node-version to 26.12.1 (#28090) (leaysgur)

Co-authored-by: Dunqing <29533304+Dunqing@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-transformer Area - JS/TS transforms and downleveling, oxc_transformer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants