Skip to content

regression: Response does not accept a async-iterator anymore #49551

Description

@mcollina

#48395 which shipped in Node v20.6.0 broke part of the fetch() spec and was caught by CITGM with some of the undici test failing everywhere.

This stopped working:

  const asyncIterable = {
    async * [Symbol.asyncIterator] () {
      yield 'a'
      yield 'b'
      yield 'c'
    }
  }

  const response = new Response(asyncIterable)
  await response.text()

I'm shipping a fix in undici in nodejs/undici#2251.

Ref. nodejs/citgm#959

(FWIW we should have caught this before release)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fetchIssues and PRs related to the Fetch API.tsc-agendaIssues and PRs to discuss during Technical Steering Committee meetings.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions