Releases: ardatan/whatwg-node
August 01, 2025
@whatwg-node/[email protected]
Patch Changes
- #2656
d2ef55c
Thanks @renovate! - Fix TypeScript issues and bump the version
to get performance improvements for all dependent packages - Updated dependencies
[d2ef55c
]:- @whatwg-node/[email protected]
@whatwg-node/[email protected]
Patch Changes
- #2656
d2ef55c
Thanks @renovate! - Fix TypeScript issues and bump the version
to get performance improvements for all dependent packages
@whatwg-node/[email protected]
Patch Changes
- #2656
d2ef55c
Thanks @renovate! - Fix TypeScript issues and bump the version
to get performance improvements for all dependent packages - Updated dependencies
[d2ef55c
]:- @whatwg-node/[email protected]
July 29, 2025
@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 } }
July 28, 2025
July 17, 2025
@whatwg-node/[email protected]
Patch Changes
-
#2553
752b0eb
Thanks @renovate! - Fix the conflict of urlpattern-ponyfill
and `@types/node` -
Updated dependencies
[b69157b
]:- @whatwg-node/[email protected]
@whatwg-node/[email protected]
Patch Changes
May 22, 2025
May 20, 2025
@whatwg-node/[email protected]
Patch Changes
-
#2424
28c4ad9
Thanks @ardatan! - Performance optimizations- Avoid creating
AbortController
andAbortSignal
if not needed withnew Request
because it
is expensive - Avoid creating a map for
Headers
and try to re-use the init object forHeaders
for
performance with a single-linewriteHead
. - Avoid creating
Buffer
forstring
bodies for performance - Use
setHeaders
which acceptsHeaders
since Node 18 if needed to forwardHeaders
to Node
- Avoid creating
-
Updated dependencies
[28c4ad9
]:- @whatwg-node/[email protected]
@whatwg-node/[email protected]
Patch Changes
-
#2424
28c4ad9
Thanks @ardatan! - Performance optimizations- Avoid creating
AbortController
andAbortSignal
if not needed withnew Request
because it
is expensive - Avoid creating a map for
Headers
and try to re-use the init object forHeaders
for
performance with a single-linewriteHead
. - Avoid creating
Buffer
forstring
bodies for performance - Use
setHeaders
which acceptsHeaders
since Node 18 if needed to forwardHeaders
to Node
- Avoid creating
@whatwg-node/[email protected]
Patch Changes
-
#2424
28c4ad9
Thanks @ardatan! - Performance optimizations- Avoid creating
AbortController
andAbortSignal
if not needed withnew Request
because it
is expensive - Avoid creating a map for
Headers
and try to re-use the init object forHeaders
for
performance with a single-linewriteHead
. - Avoid creating
Buffer
forstring
bodies for performance - Use
setHeaders
which acceptsHeaders
since Node 18 if needed to forwardHeaders
to Node
- Avoid creating
-
1642a76
Thanks @ardatan! - Remove unnecessary workaround for Bun -
Updated dependencies
[28c4ad9
]:- @whatwg-node/[email protected]
May 16, 2025
@whatwg-node/[email protected]
Patch Changes
May 16, 2025
@whatwg-node/[email protected]
Patch Changes
- #2414
1f0b643
Thanks @ardatan! - Improvements for Node 24 and useonce
from
node:events
for Promise-based event handling whenever possible
@whatwg-node/[email protected]
Patch Changes
May 10, 2025
@whatwg-node/[email protected]
Patch Changes
-
#2383
9527e8f
Thanks @ardatan! - Some implementations likecompression
npm
package do not implementresponse.write(data, callback)
signature, but whatwg-node/server waits
for it to finish the response stream. Then it causes the response stream hangs when the
compression package takes the stream over when the response data is larger than its threshold.It is actually a bug in
compression
package;
expressjs/compression#46 But since it is a
common mistake, we prefer to workaround this on our end.Now after calling
response.write
, it no longer uses callback but first it checks the result;if it is
true
, it means stream is drained and we can callresponse.end
immediately. else if it
isfalse
, it means the stream is not drained yet, so we can wait for thedrain
event to call
response.end
. -
Updated dependencies
[9527e8f
]:- @whatwg-node/[email protected]
@whatwg-node/[email protected]
Patch Changes
-
#2383
9527e8f
Thanks @ardatan! - Some implementations likecompression
npm
package do not implementresponse.write(data, callback)
signature, but whatwg-node/server waits
for it to finish the response stream. Then it causes the response stream hangs when the
compression package takes the stream over when the response data is larger than its threshold.It is actually a bug in
compression
package;
expressjs/compression#46 But since it is a
common mistake, we prefer to workaround this on our end.Now after calling
response.write
, it no longer uses callback but first it checks the result;if it is
true
, it means stream is drained and we can callresponse.end
immediately. else if it
isfalse
, it means the stream is not drained yet, so we can wait for thedrain
event to call
response.end
. -
Updated dependencies
[d86b4f3
]:- @whatwg-node/[email protected]
@whatwg-node/[email protected]
Patch Changes
- #2408
d86b4f3
Thanks @slagiewka! - Reuse fake promise Symbol
@whatwg-node/[email protected]
Patch Changes
-
#2383
9527e8f
Thanks @ardatan! - Some implementations likecompression
npm
package do not implementresponse.write(data, callback)
signature, but whatwg-node/server waits
for it to finish the response stream. Then it causes the response stream hangs when the
compression package takes the stream over when the response data is larger than its threshold.It is actually a bug in
compression
package;
expressjs/compression#46 But since it is a
common mistake, we prefer to workaround this on our end.Now after calling
response.write
, it no longer uses callback but first it checks the result;if it is
true
, it means stream is drained and we can callresponse.end
immediately. else if it
isfalse
, it means the stream is not drained yet, so we can wait for thedrain
event to call
response.end
. -
Updated dependencies
[d86b4f3
,
9527e8f
]:- @whatwg-node/[email protected]
- @whatwg-node/[email protected]
April 14, 2025
@whatwg-node/[email protected]
Patch Changes
b9f3629
Thanks @enisdenjo! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.10.6
↗︎
(from^0.10.5
, independencies
)
- Updated dependency