Skip to content

Commit 75f0bb5

Browse files
Upcoming Release Changes (#2647)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 511ede6 commit 75f0bb5

3 files changed

Lines changed: 23 additions & 19 deletions

File tree

.changeset/wicked-times-sell.md

Lines changed: 0 additions & 18 deletions
This file was deleted.

packages/node-fetch/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# @whatwg-node/node-fetch
22

3+
## 0.7.24
4+
5+
### Patch Changes
6+
7+
- [#2643](https://github.com/ardatan/whatwg-node/pull/2643)
8+
[`941e5ce`](https://github.com/ardatan/whatwg-node/commit/941e5ced42ce7d6fc9fa1ee8c1494e149ffa0b20)
9+
Thanks [@ardatan](https://github.com/ardatan)! - In case of iterator cancellation, ensure the
10+
response stream a.k.a. `IncomingMessage` is properly closed.
11+
12+
```ts
13+
const response = await fetch('http://localhost:3000/stream')
14+
15+
for await (const chunk of response.body) {
16+
console.log('Received chunk:', chunk)
17+
if (chunk === 'stop') {
18+
console.log('Stopping stream')
19+
// In case of `break` which calls the `iterator.return()`, we need to ensure the stream is closed properly.
20+
break
21+
}
22+
}
23+
```
24+
325
## 0.7.23
426

527
### Patch Changes

packages/node-fetch/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@whatwg-node/node-fetch",
3-
"version": "0.7.23",
3+
"version": "0.7.24",
44
"type": "module",
55
"description": "Fetch API implementation for Node",
66
"repository": {

0 commit comments

Comments
 (0)