Matteo Collina
9a7e7b889b
stream: fix nested compose error propagation
...
PR-URL: https://github.com/nodejs/node/pull/62556
Fixes: https://github.com/nodejs/node/issues/60083
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2026-04-17 01:46:10 +00:00
Robert Nagy
4dc18ef29d
stream: noop pause/resume on destroyed streams
...
Signed-off-by: Robert Nagy <ronagy@icloud.com >
PR-URL: https://github.com/nodejs/node/pull/62557
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
2026-04-10 11:13:34 +02:00
Antoine du Hamel
b52102f11d
stream: refactor duplexify to be less suceptible to prototype pollution
...
PR-URL: https://github.com/nodejs/node/pull/62559
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2026-04-09 15:44:58 +00:00
Ahmed Elhor
68e5f873aa
stream: propagate destruction in duplexPair
...
Ensure destroying one side of a duplexPair triggers destruction of the
other side via process.nextTick(). Only the destruction signal is sent
to avoid breaking changes.
Fixes: https://github.com/nodejs/node/issues/61015
PR-URL: https://github.com/nodejs/node/pull/61098
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk >
2026-04-07 19:51:49 +02:00
James M Snell
500c3a53e3
stream: add stream/iter to classic stream adapters
...
Signed-off-by: James M Snell <jasnell@gmail.com >
Assisted-by: Opencode/Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/62469
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2026-04-06 09:59:56 -07:00
James M Snell
ae7c6a7767
stream: add stream/iter Implementation
...
Experimental implementation of https://stream-iter.jasnell.me/
Signed-off-by: James M Snell <jasnell@gmail.com >
Assisted-By: Claude/Opus 4.6
PR-URL: https://github.com/nodejs/node/pull/62066
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2026-03-27 19:55:08 -07:00
Marco
4d2d6de1b6
stream: preserve error over AbortError in pipeline
...
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/62113
Fixes: https://github.com/nodejs/node/issues/62089
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2026-03-18 06:04:26 +00:00
Ali Hassan
e47df44a78
stream: replace bind with arrow function for onwrite callback
...
PR-URL: https://github.com/nodejs/node/pull/62087
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2026-03-11 22:16:16 +00:00
Matteo Collina
8edeff9aa7
stream: fix UTF-8 character corruption in fast-utf8-stream
...
Fix releaseWritingBuf() to correctly handle partial writes that split
multi-byte UTF-8 characters. The previous implementation incorrectly
converted byte counts to character counts, causing:
- 3-byte characters (CJK) to be silently dropped
- 4-byte characters (emoji) to leave lone surrogates in the buffer
The fix backs up from the byte position to find a valid UTF-8 character
boundary by checking for continuation bytes (pattern 10xxxxxx), then
decodes the properly-aligned bytes to get the correct character count.
Also fixes a typo where this._asyncDrainScheduled was used instead of
the private field this.#asyncDrainScheduled.
Fixes: https://github.com/nodejs/node/issues/61744
PR-URL: https://github.com/nodejs/node/pull/61745
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2026-03-05 19:32:54 +00:00
Thomas Watson
d10104bd94
stream: fix decoded fromList chunk boundary check
...
Correct `fromList()` in decoded string mode to compare `n` against the
current chunk length, not the buffer array length.
This prevents over-consuming chunks, which can corrupt readable state
and crash with `TypeError` when mixing `setEncoding()` and `read(n)`.
PR-URL: https://github.com/nodejs/node/pull/61884
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2026-02-22 00:19:40 +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
Robert Nagy
fadb214d95
stream: readable read one buffer at a time
...
Instead of wasting cycles concatenating buffers, just return each
one by one.
Similar (but not exact) old behavior can be achieved by using
`readable.read(readable.readableLength)` instead of
`readable.read()`. In some edge cases it might be necessary
to do a `readable.read(0)` first.
PR: https://github.com/nodejs/node/pull/60441
PR-URL: https://github.com/nodejs/node/pull/60441
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-01-21 08:29:40 +00:00
Gerhard Stöbich
926162a2ea
async_hooks: enabledHooksExist shall return if hooks are enabled
...
Correct the implementaton of enabledHooksExist to return true if
there are enabled hooks.
Adapt callsites which used getHooksArrays() as workaround.
PR-URL: https://github.com/nodejs/node/pull/61054
Fixes: https://github.com/nodejs/node/issues/61019
Refs: https://github.com/nodejs/node/pull/59873
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day >
2025-12-31 14:45:20 +00:00
René
5e677d6e7e
stream: do not pass readable.compose() output via Readable.from()
...
PR-URL: https://github.com/nodejs/node/pull/60907
Fixes: https://github.com/nodejs/node/issues/55203
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-12-23 18:52:32 +00:00
Antoine du Hamel
0392f0caea
lib: add lint rules for reflective function calls
...
PR-URL: https://github.com/nodejs/node/pull/60825
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2025-11-27 10:24:09 +01:00
René
9c2500295e
events: repurpose events.listenerCount() to accept EventTargets
...
PR-URL: https://github.com/nodejs/node/pull/60214
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2025-11-26 11:09:07 +00: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
Gürgün Dayıoğlu
2271d2dc10
lib: use FastBuffer for empty buffer allocation
...
PR-URL: https://github.com/nodejs/node/pull/60558
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
2025-11-15 21:39:32 +01:00
Renegade334
21b0fe4b28
lib: replace global SharedArrayBuffer constructor with bound method
...
PR-URL: https://github.com/nodejs/node/pull/60497
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2025-11-03 13:23:20 +00:00
Robert Nagy
3dba25fbd2
stream: don't try to read more if reading
...
Avoid unnecessary nextTick.
PR-URL: https://github.com/nodejs/node/pull/60454
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2025-10-30 08:55:51 +00:00
avcribl
4fe325d93d
stream: preserve AsyncLocalStorage on finished only when needed
...
PR-URL: https://github.com/nodejs/node/pull/59873
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Daniel Lemire <daniel@lemire.me >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-10-27 19:23:34 +00:00
Matteo Collina
1ebe88f87c
stream: use new AsyncResource instead of bind
...
The bind method uses ObjectDefineProperty that shows up
in flamegraphs. This changes it to avoid the utility.
Signed-off-by: Matteo Collina <hello@matteocollina.com >
PR-URL: https://github.com/nodejs/node/pull/59867
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2025-09-16 20:24:38 +00:00
Yoo
303677b362
Revert "lib: optimize writable stream buffer clearing"
...
This reverts commit 8a2fec1f6f .
PR-URL: https://github.com/nodejs/node/pull/59743
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2025-09-08 08:11:20 +00:00
방진혁
eefe3b14bf
stream: replace manual function validation with validateFunction
...
Replace repetitive manual function type checking with the existing
validateFunction in multiple stream operator functions.
PR-URL: https://github.com/nodejs/node/pull/59529
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mattias Buelens <mattias@buelens.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-08-30 14:37:15 +00:00
Yoo
8a2fec1f6f
lib: optimize writable stream buffer clearing
...
Improved the `clearBuffer` function
by replacing `buffered.splice` with `ArrayPrototypeSlice`.
- Eliminates O(N) shifting overhead.
- Improves CPU utilization and reduces GC overhead.
PR-URL: https://github.com/nodejs/node/pull/59406
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2025-08-11 03:29:01 +00:00
James M Snell
5335c101a9
fs: port SonicBoom module to fs module as Utf8Stream
...
As a first step to porting portions of the pino structured
logger into the runtime, this commit ports the SonicBoom
module to the fs module as Utf8Stream.
This is a faithful port of the SonicBoom module with some
modern updates, such as converting to a Class and using
Symbol.dispose. The bulk of the implementation is unchanged
from the original.
PR-URL: https://github.com/nodejs/node/pull/58897
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2025-07-28 20:27:07 -07:00
Livia Medeiros
6c9a7cd61e
lib: make ERM functions into wrappers returning undefined
...
PR-URL: https://github.com/nodejs/node/pull/58400
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2025-05-25 13:44:43 +00:00
Gürgün Dayıoğlu
4b2b3c01b4
stream: preserve AsyncLocalStorage context in finished()
...
PR-URL: https://github.com/nodejs/node/pull/57865
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-04-16 09:27:37 +00:00
jakecastelli
6156f8a6d5
Revert "stream: handle generator destruction from Duplex.from()"
...
This reverts commit 55413004c8 .
PR-URL: https://github.com/nodejs/node/pull/56278
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-12-24 13:30:54 +00:00
jakecastelli
fd8de670da
stream: catch and forward error from dest.write
...
PR-URL: https://github.com/nodejs/node/pull/55270
Fixes: https://github.com/nodejs/node/issues/54945
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-12-19 11:49:34 +00:00
Matthieu Sieben
55413004c8
stream: handle generator destruction from Duplex.from()
...
PR-URL: https://github.com/nodejs/node/pull/55096
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
2024-12-12 08:14:08 +00:00
Marvin ROGER
4a00f9a1c4
stream: propagate AbortSignal reason
...
PR-URL: https://github.com/nodejs/node/pull/55473
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
2024-10-22 16:14:02 +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
Aviv Keller
71785889c8
lib: prefer logical assignment
...
PR-URL: https://github.com/nodejs/node/pull/55044
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
2024-10-09 06:42:16 +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
Aviv Keller
574f2dd517
lib: prefer optional chaining
...
PR-URL: https://github.com/nodejs/node/pull/55045
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2024-09-24 19:48:15 +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
YoonSoo_Shin
d7f373075d
lib: replace spread operator with primordials function
...
replaced the spread operator with ArrayPrototypeSlice to avoid reliance
on user-mutable methods and enhance the safety of array iteration
Refs:
https://github.com/nodejs/node/blob/main/doc/contributing/primordials.md#unsafe-array-iteration
PR-URL: https://github.com/nodejs/node/pull/54053
Refs: https://github.com/nodejs/node/blob/main/doc/contributing/primordials.md#unsafe-array-iteration
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Raz Luvaton <rluvaton@gmail.com >
2024-08-12 07:05:39 +00:00
jakecastelli
fafc845089
stream: make checking pendingcb on WritableStream backward compatible
...
PR-URL: https://github.com/nodejs/node/pull/54142
Fixes: https://github.com/nodejs/node/issues/54131
Refs: https://github.com/nodejs/node/issues/54131
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2024-08-05 12:30:29 +00:00
YoonSoo_Shin
e6ee6e2901
lib: fix typos in comments within internal/streams
...
fixed typos in comments within the internal/streams directory.
PR-URL: https://github.com/nodejs/node/pull/54093
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2024-08-05 01:58:40 +00:00
Austin Wright
b32732b1ee
stream: expose DuplexPair API
...
PR-URL: https://github.com/nodejs/node/pull/34111
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-07-26 08:09:23 +00:00
jakecastelli and wh0
8e5d88b641
stream: pipeline wait for close before calling the callback
...
The pipeline should wait for close event to finish before calling
the callback.
The `finishCount` should not below 0 when calling finish function.
Fixes: https://github.com/nodejs/node/issues/51540
Co-authored-by: wh0 <wh0@users.noreply.github.com >
PR-URL: https://github.com/nodejs/node/pull/53462
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
2024-06-27 11:29:35 +00:00
75fe4f35d4
stream: support dispose in writable
...
Add support to Symbol.asyncDispose in writable streams.
Additionally add a test for writable, transform and duplex streams
who inherit from readable/writable to avoid breakage.
Co-authored-by: Robert Nagy <ronagy@icloud.com >
Co-authored-by: atlowChemi <chemi@atlow.co.il >
PR-URL: https://github.com/nodejs/node/pull/48547
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-15 23:41:59 +00:00
jakecastelli
177d63f573
stream: callback should be called when pendingcb is 0
...
Fixes: https://github.com/nodejs/node/issues/46170
PR-URL: https://github.com/nodejs/node/pull/53438
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-15 07:30:11 +00:00
jakecastelli
922feb1ff5
stream: pipe to a closed or destroyed stream is not allowed in pipeline
...
PR-URL: https://github.com/nodejs/node/pull/53241
Fixes: https://github.com/nodejs/node/issues/52622
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-14 08:27:56 +00:00
jakecastelli
8e6901a703
stream: make sure _destroy is called
...
PR-URL: https://github.com/nodejs/node/pull/53213
Fixes: https://github.com/nodejs/node/issues/51987
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-06-10 14:56:04 +00:00
jakecastelli and Robert Nagy
50695e5de1
stream: prevent stream unexpected pause when highWaterMark set to 0
...
Co-authored-by: Robert Nagy <ronagy@icloud.com >
PR-URL: https://github.com/nodejs/node/pull/53261
Fixes: https://github.com/nodejs/node/issues/51930
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-08 02:04:40 +00:00
Orgad Shaneh
7d14d1fe06
stream: micro-optimize writable condition
...
PR-URL: https://github.com/nodejs/node/pull/53189
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-04 09:47:35 +00:00
Orgad Shaneh
78a326e2eb
stream: fix memory usage regression in writable
...
Setting writecb and afterWriteTickInfo to null did not clear the value
in the state object.
Amends 35ec93115d (stream: writable state bitmap).
Fixes #52228 .
PR-URL: https://github.com/nodejs/node/pull/53188
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-06-02 00:35:36 +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