Skip to content

July 29, 2025

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Jul 15:10
· 112 commits to master since this release
75f0bb5

@whatwg-node/[email protected]

Patch Changes

  • #2643
    941e5ce
    Thanks @ardatan! - In case of iterator cancellation, ensure the
    response stream a.k.a. IncomingMessage is properly closed.

    const response = await fetch('http://localhost:3000/stream')
    
    for await (const chunk of response.body) {
      console.log('Received chunk:', chunk)
      if (chunk === 'stop') {
        console.log('Stopping stream')
        // In case of `break` which calls the `iterator.return()`, we need to ensure the stream is closed properly.
        break
      }
    }