Releases: ardatan/whatwg-node
May 22, 2025
May 20, 2025
@whatwg-node/fetch@0.10.8
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/node-fetch@0.7.21
@whatwg-node/node-fetch@0.7.21
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/server@0.10.9
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/fetch@0.10.8
May 16, 2025
May 16, 2025
May 10, 2025
@whatwg-node/fetch@0.10.7
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/node-fetch@0.7.19
@whatwg-node/node-fetch@0.7.19
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/promise-helpers@1.3.2
@whatwg-node/promise-helpers@1.3.2
Patch Changes
- #2408
d86b4f3
Thanks @slagiewka! - Reuse fake promise Symbol
@whatwg-node/server@0.10.6
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/promise-helpers@1.3.2
- @whatwg-node/fetch@0.10.7
April 14, 2025
@whatwg-node/server@0.10.5
Patch Changes
b9f3629
Thanks @enisdenjo! - dependencies updates:- Updated dependency
@whatwg-node/fetch@^0.10.6
↗︎
(from^0.10.5
, independencies
)
- Updated dependency
April 14, 2025
@whatwg-node/fetch@0.10.6
Patch Changes
- #2310
f699a1b
Thanks @enisdenjo! - dependencies updates:- Updated dependency
@whatwg-node/node-fetch@^0.7.18
↗︎
(from^0.7.11
, independencies
)
- Updated dependency
April 14, 2025
@whatwg-node/node-fetch@0.7.18
Patch Changes
-
#2305
380984a
Thanks @enisdenjo! - dependencies updates:- Added dependency
@fastify/busboy@^3.1.1
↗︎ (to
dependencies
) - Removed dependency
busboy@^1.6.0
↗︎ (from
dependencies
)
- Added dependency
-
#2305
380984a
Thanks @enisdenjo! - Abort parsing form data if the request is
aborted -
#2305
380984a
Thanks @enisdenjo! - Handle parsing form data when supplied
Content-Length header value is smaller than the actual data -
Updated dependencies
[6bf6aa0
]:- @whatwg-node/promise-helpers@1.3.1
@whatwg-node/promise-helpers@1.3.1
Patch Changes
- #2276
6bf6aa0
Thanks @andreialecu! - Fix types by replacingVoidFunction
type to() => void