Files
node/doc/api
James M Snell 04bd7378a2 stream: add pipeToSync() failOnIncompleteClose option
pipeToSync() does not fail the writer when endSync() returns -1, so
that a caller can still close it asynchronously. A caller that cannot,
e.g. because the writer is sync-only and has no end(), would be left
with a writer that is neither closed nor failed.

Add a failOnIncompleteClose option (a Node.js extension) that fails
the writer with the thrown ERR_INVALID_STATE error in that case.
preventFail takes precedence over it.

Assisted-by: OpenCode
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66483
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-10-10 17:56:39 +00:00
..
2026-09-03 11:40:52 +02:00
2026-09-22 10:59:57 +02:00
2026-10-07 16:40:44 +02:00
2026-09-03 15:37:21 +00:00
2026-09-25 20:28:33 +00:00
2025-12-16 20:31:28 +00:00
2026-10-05 21:26:47 +00:00
2026-09-11 13:15:27 -04:00
2026-10-05 16:47:38 +00:00
2026-08-03 11:44:23 +00:00
2026-09-25 20:28:33 +00:00
2026-09-09 18:04:31 +02:00
2026-10-07 16:40:44 +02:00
2026-10-07 16:40:44 +02:00
2026-10-07 16:40:44 +02:00