January 10, 2025
@whatwg-node/fetch@0.10.2
Patch Changes
- #1929
b88b85c
Thanks @ardatan! - dependencies updates:- Updated dependency
@whatwg-node/node-fetch@^0.7.5↗︎
(from^0.7.1, independencies)
- Updated dependency
- Updated dependencies
[b88b85c,
9b39c3e,
b88b85c]:- @whatwg-node/node-fetch@0.7.6
@whatwg-node/node-fetch@0.7.6
Patch Changes
-
#1929
b88b85c
Thanks @ardatan! - dependencies updates:- Removed dependency
@kamilkisiela/fast-url-parser@^1.1.4↗︎
(fromdependencies) - Removed dependency
fast-querystring@^1.1.1↗︎ (from
dependencies)
- Removed dependency
-
#1947
9b39c3e
Thanks @ardatan! - Remove the event listener on the provided
AbortSignalwhennode-libcurlis used, the connection finishes to prevent potential memory
leaks;const res = await fetch(URL, { signal: new AbortController().signal }) // AbortController is never aborted, and HTTP request is done as expected successfully
-
#1929
b88b85c
Thanks @ardatan! - - Remove URL ponyfill implementation based on
fast-url-parserandfast-querystring, because Node now uses Ada URL parser which is fast
enough.- Fix
ReadableStream[Symbol.asyncIterator]
ReadableStreamusesReadableso it usesSymbol.asyncIteratormethod ofReadablebut the
returned iterator's.returnmethod doesn't handle cancellation correctly. So we need to call
readable.destroy(optionalError)manually to cancel the stream.This allows
ReadableStreamto use implementations relying onAsyncIterable.cancelto handle
cancellation likeReadable.fromPreviously the following was not handling cancellation;
const res = new ReadableStream({ start(controller) { controller.enqueue('Hello') controller.enqueue('World') }, cancel(reason) { console.log('cancelled', reason) } }) const readable = Readable.from(res) readable.destroy(new Error('MY REASON')) // Should log 'cancelled MY REASON'
- Fix