File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments