Filip Skokan
978a8c405e
lib: fix lint in internal/webstreams/util.js
...
PR-URL: https://github.com/nodejs/node/pull/62806
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk >
Reviewed-By: Richard Lau <richard.lau@ibm.com >
2026-04-18 20:03:12 +02:00
Antoine du Hamel
1266013d19
stream: simplify readableStreamFromIterable
...
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/62651
Reviewed-By: Aviv Keller <me@aviv.sh >
2026-04-18 14:27:54 +00:00
Ali Hassan
bee1087258
lib: reject SharedArrayBuffer in web APIs per spec
...
Signed-off-by: Ali Hassan <ali-hassan27@outlook.com >
PR-URL: https://github.com/nodejs/node/pull/62632
Refs: https://github.com/nodejs/node/issues/59688
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2026-04-16 19:53:24 +00:00
René
9cae81932c
stream: allow shared array buffer sources in writable webstream adapter
...
Refs: https://github.com/nodejs/node/pull/61913
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk >
PR-URL: https://github.com/nodejs/node/pull/62163
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2026-04-13 15:42:29 +00:00
Antoine du Hamel
0fea43023a
stream: simplify createPromiseCallback
...
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/62650
Reviewed-By: Aviv Keller <me@aviv.sh >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2026-04-11 15:45:39 +00:00
sangwook
20cacec5c6
stream: fix writev unhandled rejection in fromWeb
...
When using Duplex.fromWeb() or Writable.fromWeb() with cork()/uncork(),
writes are batched into _writev(). If destroy() is called in the same
microtask, the underlying WritableStream writer gets aborted, causing
SafePromiseAll() to reject with a non-array value (e.g. an AbortError).
The done() callback in _writev() of both fromWeb adapter functions
unconditionally called error.filter(), assuming the value was always an
array. This caused a TypeError that became an unhandled rejection,
crashing the process.
Fix by separating the resolve and reject handlers of SafePromiseAll:
use () => done() on the resolve path (all writes succeeded, no error)
and done on the reject path (error passed directly to callback).
Fixes: https://github.com/nodejs/node/issues/62199
Signed-off-by: sangwook <rewq5991@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/62297
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk >
2026-04-10 20:39:49 +00:00
René
ac6375417a
stream: promote DEP0201 to runtime deprecation
...
PR-URL: https://github.com/nodejs/node/pull/62173
Refs: https://github.com/nodejs/node/pull/61632
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2026-03-17 13:38:50 +00:00
Mattias Buelens
f82525e9c8
stream: optimize webstreams pipeTo
...
PR-URL: https://github.com/nodejs/node/pull/62079
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2026-03-09 03:18:17 +00:00
Filip Skokan
3725bd2145
stream: fix brotli error handling in web compression streams
...
Convert brotli decompression errors to TypeError to match the
Compression Streams spec, by extending handleKnownInternalErrors()
in the adapters layer to recognize brotli error codes.
This replaces the manual error event handler on DecompressionStream
which was redundant with the adapter's built-in error propagation.
PR-URL: https://github.com/nodejs/node/pull/62107
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk >
2026-03-06 22:08:57 +00:00
Filip Skokan
7991cd2a71
stream: improve Web Compression spec compliance
...
Pass rejectGarbageAfterEnd: true to createInflateRaw() and
createBrotliDecompress(), matching the behavior already in place
for deflate and gzip. The Compression Streams spec treats any
data following a valid compressed payload as an error.
When the underlying Node.js stream throws synchronously from
write() (e.g. zlib rejects an invalid chunk type), destroy the
stream so that the readable side is also errored. Without this,
the readable side hangs forever waiting for data that will never
arrive.
Introduce a kValidateChunk callback option in the webstreams
adapter layer. Compression streams use this to validate that
chunks are BufferSource instances not backed by SharedArrayBuffer,
replacing the previous monkey-patching of the underlying
handle's write method.
Unskip WPT compression bad-chunks tests which now run instead of
hang and mark the remaining expected failures.
PR-URL: https://github.com/nodejs/node/pull/62107
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk >
2026-03-06 22:08:56 +00:00
Marco
16472884aa
stream: fix TransformStream race on cancel with pending write
...
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/62040
Fixes: https://github.com/nodejs/node/issues/62036
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
2026-03-04 16:02:27 +00:00
조수민
cb6ff03cc5
stream: accept ArrayBuffer in CompressionStream and DecompressionStream
...
PR-URL: https://github.com/nodejs/node/pull/61913
Fixes: https://github.com/nodejs/node/issues/43433
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2026-03-02 23:15:09 +00:00
Matteo Collina
abddfc921b
stream: fix pipeTo to defer writes per WHATWG spec
...
The WHATWG Streams spec requires that pipeTo's chunk handling must
queue a microtask before calling the write algorithm. This ensures
that enqueue() does not synchronously trigger writes.
Previously, PipeToReadableStreamReadRequest[kChunk] would synchronously
call writableStreamDefaultWriterWrite(), which violated the spec and
caused the WPT test "enqueue() must not synchronously call write
algorithm" to fail.
Fix by wrapping the write operation in queueMicrotask(), which defers
it to the next microtask as required by the spec.
Refs: https://github.com/whatwg/streams/issues/1243
PR-URL: https://github.com/nodejs/node/pull/61800
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
2026-02-26 07:54:39 +00:00
Matteo Collina and Malte Ubl
199daab0b0
stream: add fast paths for webstreams read and pipeTo
...
Add internal fast paths to improve webstreams performance without
changing the public API or breaking spec compliance.
1. ReadableStreamDefaultReader.read() fast path:
When data is already buffered in the controller's queue, return
PromiseResolve() directly without creating a DefaultReadRequest
object. This is spec-compliant because read() returns a Promise,
and resolved promises still run callbacks in the microtask queue.
2. pipeTo() batch read fast path:
When data is buffered, batch reads directly from the controller
queue up to highWaterMark without creating
PipeToReadableStreamReadRequest objects per chunk. Respects
backpressure by checking desiredSize after each write.
Benchmark results:
- pipeTo: ~11% faster (***)
- buffered read(): ~17-20% faster (***)
Co-Authored-By: Malte Ubl <malte@vercel.com >
PR-URL: https://github.com/nodejs/node/pull/61807
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2026-02-19 21:53:46 +00:00
René
04946a7a8c
stream: rename Duplex.toWeb() type option to readableType
...
PR-URL: https://github.com/nodejs/node/pull/61632
Refs: https://github.com/nodejs/node/pull/58664
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
2026-02-11 02:15:43 +00:00
René
5d39030b2e
stream: export namespace object from internal end-of-stream module
...
PR-URL: https://github.com/nodejs/node/pull/61455
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2026-01-23 11:47:27 +00:00
René
ecdf6a8c53
stream: fix isErrored/isWritable for WritableStreams
...
PR-URL: https://github.com/nodejs/node/pull/60905
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2025-12-03 13:08:34 +00:00
Michaël Zasso
10837e33b0
lib,test: fix jsdoc comments
...
To prepare for eslint-plugin-jsdoc update.
Refs: https://github.com/nodejs/node/pull/60535
PR-URL: https://github.com/nodejs/node/pull/60870
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-11-30 19:14:12 +01:00
Hans Klunder
33b1574cbf
lib: add support for readable byte streams to .toWeb()
...
Add support for the creation of ReadableByteStream to Readable.toWeb()
and Duplex.toWeb()
This enables the use of .getReader({ mode: "byob" }) on
e.g. socket().toWeb()
Refs: https://github.com/nodejs/node/issues/56004#issuecomment-2908265316
Refs: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Using_readable_byte_streams
PR-URL: https://github.com/nodejs/node/pull/58664
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-11-16 06:51:24 +00:00
Khafra
44d9e6d8ad
stream: add brotli support to CompressionStream and DecompressionStream
...
Refs: https://github.com/whatwg/compression/issues/34
PR-URL: https://github.com/nodejs/node/pull/59464
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2025-08-21 02:22:19 +00:00
Yagiz Nizipli
0fd1ecded6
meta: enable jsdoc/check-tag-names rule
...
PR-URL: https://github.com/nodejs/node/pull/58521
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2025-07-18 09:28:21 +00:00
0hm☘️
62855f3b8c
stream: making DecompressionStream spec compilent for trailing junk
...
Introduce `ERR_TRAILING_JUNK_AFTER_STREAM_END`
error to handle unexpected data after the end of
a compressed stream. This ensures proper error
reporting when decompressing deflate or gzip
streams with trailing junk. Added tests to
verify the behavior.
Fixes: https://github.com/nodejs/node/issues/58247
PR-URL: https://github.com/nodejs/node/pull/58316
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
2025-05-26 00:38:39 +00:00
Daeyeon Jeong
c566639026
stream: fix sizeAlgorithm validation in WritableStream
...
Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/57280
Fixes: https://github.com/nodejs/node/issues/57272
Refs: https://github.com/nodejs/node/pull/56067
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
2025-03-05 03:04:39 +00:00
James M Snell
85c0f7aef3
lib: fixup more incorrect ERR_INVALID_ARG_VALUE uses
...
PR-URL: https://github.com/nodejs/node/pull/57177
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-02-24 23:23:32 +00:00
Mattias Buelens
464f335a69
stream: fix typo in ReadableStreamBYOBReader.readIntoRequests
...
PR-URL: https://github.com/nodejs/node/pull/56560
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-01-13 15:11:47 +00:00
Jason Zhang
57b21b16d2
stream: validate undefined sizeAlgorithm in WritableStream
...
PR-URL: https://github.com/nodejs/node/pull/56067
Fixes: https://github.com/nodejs/node/issues/56014
Refs: https://github.com/whatwg/streams/pull/1333
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
2024-12-20 06:57:34 +00:00
Mattias Buelens
f6f519c6b6
stream: commit pull-into descriptors after filling from queue
...
Fixes: https://github.com/nodejs/node/issues/56044
PR-URL: https://github.com/nodejs/node/pull/56072
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
2024-12-07 03:45:13 +00:00
Yagiz Nizipli
bb8cc65edb
lib: replace createDeferredPromise util with Promise.withResolvers
...
PR-URL: https://github.com/nodejs/node/pull/54836
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2024-10-19 10:13:58 +02:00
Jason Zhang
50b4ada551
lib: convert transfer sequence to array in js
...
This commit lets `tranfer` passed to `structuredClone` get validated at
JS layer by doing webidl conversion. This avoids the C++ to JS function
call overhead in the native implementaiton of `structuredClone`
PR-URL: https://github.com/nodejs/node/pull/55317
Fixes: https://github.com/nodejs/node/issues/55280
Refs: https://github.com/nodejs/node/pull/50330
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
2024-10-13 18:11:21 +00:00
Michaël Zasso
d5eb9a378e
lib: remove Symbol[Async]Dispose polyfills
...
PR-URL: https://github.com/nodejs/node/pull/55276
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-10-07 09:47:44 +00:00
devstone
3111ed7011
stream: handle undefined chunks correctly in decode stream
...
Align TextDecoderStream behavior with WPT requirements by treating
undefined chunks as errors. This change ensures that TextDecoderStream
properly handles unexpected chunk types and throws an error when
receiving undefined input.
This update addresses the failing WPT for decode stream error handling.
PR-URL: https://github.com/nodejs/node/pull/55153
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
2024-09-30 17:54:43 +00:00
Jason Zhang
87a79cd8a1
stream: treat null asyncIterator as undefined
...
According to the spec, getIterator should normalize incoming method to
undefined if it is either undefined or null. This PR enforces that spec
compliance with passed WPT.
PR-URL: https://github.com/nodejs/node/pull/55119
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
2024-09-27 14:34:11 +00:00
Jason Zhang
0e52836c35
stream: set stream prototype to closest transferable superclass
...
PR-URL: https://github.com/nodejs/node/pull/55067
Fixes: https://github.com/nodejs/node/issues/54603
Refs: https://github.com/nodejs/node/pull/50107
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2024-09-24 21:18:29 +00:00
Yagiz Nizipli
9195210399
lib,src: use built-in array buffer detach, transfer
...
PR-URL: https://github.com/nodejs/node/pull/54837
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-09-16 00:32:04 +00:00
jakecastelli and Jason Zhang
55f70ee178
lib: remove unnecessary async
...
Co-authored-by: Jason Zhang <xzha4350@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/54829
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2024-09-14 14:31:29 +00:00
Antoine du Hamel
7c58645aca
lib: move Symbol[Async]Dispose polyfills to internal/util
...
PR-URL: https://github.com/nodejs/node/pull/54853
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-09-10 21:24:56 +00:00
Fedor Indutny
78150f3e9c
lib: fix unhandled errors in webstream adapters
...
WebStream's Readable controller does not tolerate `.close()` being
called after an `error`. However, when wrapping a Node's Readable stream
it is possible that the sequence of events leads to `finished()`'s
callback being invoked after such `error`.
In order to handle this, in this change we call the `finished()` handler
earlier when controller is canceled, and always handle this as an error
case.
Fix: https://github.com/nodejs/node/issues/54205
PR-URL: https://github.com/nodejs/node/pull/54206
Fixes: https://github.com/nodejs/node/issues/54205
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-08-06 18:34:35 +00:00
jakecastelli
1fd170a7fc
stream: throw TypeError when criteria fulfilled in getIterator
...
PR-URL: https://github.com/nodejs/node/pull/53825
Fixes: https://github.com/nodejs/node/issues/53819
Refs: https://github.com/nodejs/node/issues/53819
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2024-08-01 02:00:47 +00:00
Benjamin Gruenbaum
74ddce8853
stream: improve inspector ergonomics
...
PR-URL: https://github.com/nodejs/node/pull/53800
Fixes: https://github.com/nodejs/node/issues/53789
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-07-12 18:00:27 +00:00
Jason
261e88e269
stream: use ByteLengthQueuingStrategy when not in objectMode
...
Fixes: https://github.com/nodejs/node/issues/46347
PR-URL: https://github.com/nodejs/node/pull/48847
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-05-12 19:24:43 +02:00
Mert Can Altin
cd155d6454
stream: fix util.inspect for compression/decompressionStream
...
PR-URL: https://github.com/nodejs/node/pull/52283
Fixes: https://github.com/nodejs/node/issues/52263
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-05-12 09:38:40 +02:00
Mattias Buelens
eee9db8b8e
stream: update ongoing promise in async iterator return() method
...
PR-URL: https://github.com/nodejs/node/pull/52657
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-04-28 16:51:44 +00:00
Antoine du Hamel
231548b5cf
lib: enforce ASCII order in error code imports
...
PR-URL: https://github.com/nodejs/node/pull/52625
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2024-04-23 17:05:38 +00:00
Antoine du Hamel
a596af0819
tools: add lint rule to keep primordials in ASCII order
...
PR-URL: https://github.com/nodejs/node/pull/52592
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-04-21 16:53:08 +00:00
atlowChemi
a9528e87b9
stream: use internal addAbortListener
...
PR-URL: https://github.com/nodejs/node/pull/52081
Refs: https://github.com/nodejs/node/pull/48596
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-03-16 09:08:59 +00:00
tsctx
66556f53a7
stream: fix cloned webstreams not being unref correctly
...
PR-URL: https://github.com/nodejs/node/pull/51526
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-01-23 06:31:45 +00:00
Matteo Collina
8e8245196a
Revert "stream: fix cloned webstreams not being unref'd"
...
This reverts commit 4d3923aaba .
PR-URL: https://github.com/nodejs/node/pull/51491
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-01-19 11:47:05 +00:00
Mattias Buelens
2e81415d9a
stream: implement min option for ReadableStreamBYOBReader.read
...
PR-URL: https://github.com/nodejs/node/pull/50888
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2024-01-04 12:57:14 +01:00
Mattias Buelens
20c63134fc
stream: fix code style
...
PR-URL: https://github.com/nodejs/node/pull/51168
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-12-26 13:43:36 +00:00
James M Snell
4d3923aaba
stream: fix cloned webstreams not being unref'd
...
When cloning a `ReadableStream` and `WritableStream`, both use an
internal `MessageChannel` to communicate with the original stream.
Those, however, previously were not unref'd which would lead to the
process not exiting if the stream was not fully consumed.
Fixes: https://github.com/nodejs/node/issues/44985
PR-URL: https://github.com/nodejs/node/pull/51255
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
2023-12-24 16:42:10 +00:00