From 80fa675af2dd53622d1e041018ed64ff58754df5 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Sun, 30 Jul 2023 17:12:50 +0100 Subject: [PATCH] doc: document pipeline with `end` option There is currently no documentation about what the `end` option in `stream.promises.pipeline` does. Refs: https://github.com/nodejs/node/pull/40886 Refs: https://github.com/nodejs/node/issues/34805#issuecomment-1345655205 Fixes: https://github.com/nodejs/node/issues/45821 PR-URL: https://github.com/nodejs/node/pull/48970 Reviewed-By: Luigi Pinca --- doc/api/stream.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index ed7edfc3421cb5..bb528970d683ba 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -65,6 +65,15 @@ or `require('node:stream').promises`. * `streams` {Stream\[]|Iterable\[]|AsyncIterable\[]|Function\[]} @@ -76,9 +85,11 @@ added: v15.0.0 * `destination` {Stream|Function} * `source` {AsyncIterable} * Returns: {Promise|AsyncIterable} -* `options` {Object} +* `options` {Object} Pipeline options * `signal` {AbortSignal} - * `end` {boolean} + * `end` {boolean} End the destination stream when the source stream ends. + Transform streams are always ended, even if this value is `false`. + **Default:** `true`. * Returns: {Promise} Fulfills when the pipeline is complete. ```cjs