Skip to content

Releases: ardatan/whatwg-node

August 01, 2025

01 Aug 00:08
bd73347
Compare
Choose a tag to compare

@whatwg-node/[email protected]

Patch Changes

@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

July 29, 2025

29 Jul 15:10
75f0bb5
Compare
Choose a tag to compare

@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

28 Jul 11:23
ae59911
Compare
Choose a tag to compare

@whatwg-node/[email protected]

Patch Changes

@whatwg-node/[email protected]

Patch Changes

  • #2640
    22c568e
    Thanks @ardatan! - Handle string bodies without streams to fix the
    performance regression

July 17, 2025

17 Jul 12:36
23779dc
Compare
Choose a tag to compare

@whatwg-node/[email protected]

Patch Changes

@whatwg-node/[email protected]

Patch Changes

May 22, 2025

22 May 02:14
68af0a3
Compare
Choose a tag to compare

@whatwg-node/[email protected]

Patch Changes

May 20, 2025

20 May 14:36
f25ab15
Compare
Choose a tag to compare

@whatwg-node/[email protected]

Patch Changes

  • #2424
    28c4ad9
    Thanks @ardatan! - Performance optimizations

    • Avoid creating AbortController and AbortSignal if not needed with new Request because it
      is expensive
    • Avoid creating a map for Headers and try to re-use the init object for Headers for
      performance with a single-line writeHead.
    • Avoid creating Buffer for string bodies for performance
    • Use setHeaders which accepts Headers since Node 18 if needed to forward Headers to Node
  • Updated dependencies
    [28c4ad9]:

@whatwg-node/[email protected]

Patch Changes

  • #2424
    28c4ad9
    Thanks @ardatan! - Performance optimizations

    • Avoid creating AbortController and AbortSignal if not needed with new Request because it
      is expensive
    • Avoid creating a map for Headers and try to re-use the init object for Headers for
      performance with a single-line writeHead.
    • Avoid creating Buffer for string bodies for performance
    • Use setHeaders which accepts Headers since Node 18 if needed to forward Headers to Node

@whatwg-node/[email protected]

Patch Changes

  • #2424
    28c4ad9
    Thanks @ardatan! - Performance optimizations

    • Avoid creating AbortController and AbortSignal if not needed with new Request because it
      is expensive
    • Avoid creating a map for Headers and try to re-use the init object for Headers for
      performance with a single-line writeHead.
    • Avoid creating Buffer for string bodies for performance
    • Use setHeaders which accepts Headers since Node 18 if needed to forward Headers to Node
  • 1642a76
    Thanks @ardatan! - Remove unnecessary workaround for Bun

  • Updated dependencies
    [28c4ad9]:

May 16, 2025

16 May 15:55
0d51ec4
Compare
Choose a tag to compare

@whatwg-node/[email protected]

Patch Changes

  • 8eb332c
    Thanks @ardatan! - Workaround for the bug in Node 24 and Deno don't
    like bound disposal functions

May 16, 2025

16 May 15:12
503d735
Compare
Choose a tag to compare

@whatwg-node/[email protected]

Patch Changes

  • #2414
    1f0b643
    Thanks @ardatan! - Improvements for Node 24 and use once from
    node:events for Promise-based event handling whenever possible

@whatwg-node/[email protected]

Patch Changes

May 10, 2025

10 May 14:55
65780bc
Compare
Choose a tag to compare

@whatwg-node/[email protected]

Patch Changes

  • #2383
    9527e8f
    Thanks @ardatan! - Some implementations like compression npm
    package do not implement response.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 call response.end immediately. else if it
    is false, it means the stream is not drained yet, so we can wait for the drain event to call
    response.end.

  • Updated dependencies
    [9527e8f]:

@whatwg-node/[email protected]

Patch Changes

  • #2383
    9527e8f
    Thanks @ardatan! - Some implementations like compression npm
    package do not implement response.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 call response.end immediately. else if it
    is false, it means the stream is not drained yet, so we can wait for the drain event to call
    response.end.

  • Updated dependencies
    [d86b4f3]:

@whatwg-node/[email protected]

Patch Changes

@whatwg-node/[email protected]

Patch Changes

  • #2383
    9527e8f
    Thanks @ardatan! - Some implementations like compression npm
    package do not implement response.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 call response.end immediately. else if it
    is false, it means the stream is not drained yet, so we can wait for the drain event to call
    response.end.

  • Updated dependencies
    [d86b4f3,
    9527e8f]:

April 14, 2025

14 Apr 20:36
c7961f9
Compare
Choose a tag to compare

@whatwg-node/[email protected]

Patch Changes