From d71bb33b706134f4d357d7dc1c34a1764b37343f Mon Sep 17 00:00:00 2001 From: Debadree Chatterjee Date: Sun, 12 Feb 2023 02:00:28 +0530 Subject: [PATCH 1/5] doc: include context on .toWeb() parameters Refs: https://github.com/nodejs/node/issues/46347 --- doc/api/stream.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index ac9ea0afd8f331..49977077794e18 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -3005,8 +3005,12 @@ added: v17.0.0 * `streamReadable` {stream.Readable} * `options` {Object} * `strategy` {Object} - * `highWaterMark` {number} - * `size` {Function} + * `highWaterMark` {number} The maximum internal queue size (of the created + `ReadableStream`) before backpressure is applied in reading from the given + `stream.Readable`. + * `size` {Function} A function that size of the given chunk of data + * `chunk` {any} + * Returns: {number} * Returns: {ReadableStream} ### `stream.Writable.fromWeb(writableStream[, options])` From 6e1393e79eca8b8024b3d7fc77bb3a9be359123a Mon Sep 17 00:00:00 2001 From: Debadree Chatterjee Date: Sun, 12 Feb 2023 22:54:27 +0530 Subject: [PATCH 2/5] fixup! add default information --- doc/api/stream.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 49977077794e18..0137cdb7fcda47 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -3007,7 +3007,8 @@ added: v17.0.0 * `strategy` {Object} * `highWaterMark` {number} The maximum internal queue size (of the created `ReadableStream`) before backpressure is applied in reading from the given - `stream.Readable`. + `stream.Readable`. The default value is taken from the `highWaterMark` of the + given `stream.Readable`. * `size` {Function} A function that size of the given chunk of data * `chunk` {any} * Returns: {number} From 296d0b71cba07696d52c0d39dd95fdbefb3fb411 Mon Sep 17 00:00:00 2001 From: Debadree Chatterjee Date: Sun, 12 Feb 2023 23:05:54 +0530 Subject: [PATCH 3/5] fixup! Co-authored-by: Antoine du Hamel --- doc/api/stream.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 0137cdb7fcda47..b1da03112241de 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -3007,7 +3007,7 @@ added: v17.0.0 * `strategy` {Object} * `highWaterMark` {number} The maximum internal queue size (of the created `ReadableStream`) before backpressure is applied in reading from the given - `stream.Readable`. The default value is taken from the `highWaterMark` of the + `stream.Readable`. If no value is provided, it will be taken from the given `stream.Readable`. * `size` {Function} A function that size of the given chunk of data * `chunk` {any} From e4e1b89e833cc14f44d074dfa1647616b9681a7c Mon Sep 17 00:00:00 2001 From: Debadree Chatterjee Date: Sun, 12 Feb 2023 23:34:30 +0530 Subject: [PATCH 4/5] fixup! Co-authored-by: Antoine du Hamel --- doc/api/stream.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index b1da03112241de..820c228ee0363a 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -3009,7 +3009,8 @@ added: v17.0.0 `ReadableStream`) before backpressure is applied in reading from the given `stream.Readable`. If no value is provided, it will be taken from the given `stream.Readable`. - * `size` {Function} A function that size of the given chunk of data + * `size` {Function} A function that size of the given chunk of data. If no value is + provided, the size will be `1` for all the chunks. * `chunk` {any} * Returns: {number} * Returns: {ReadableStream} From 404fece06550d7992d3aa22645d04d2ef5833029 Mon Sep 17 00:00:00 2001 From: Debadree Chatterjee Date: Sun, 12 Feb 2023 23:50:30 +0530 Subject: [PATCH 5/5] fixup! lint --- doc/api/stream.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 820c228ee0363a..72f78b6a22b19b 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -3009,8 +3009,8 @@ added: v17.0.0 `ReadableStream`) before backpressure is applied in reading from the given `stream.Readable`. If no value is provided, it will be taken from the given `stream.Readable`. - * `size` {Function} A function that size of the given chunk of data. If no value is - provided, the size will be `1` for all the chunks. + * `size` {Function} A function that size of the given chunk of data. + If no value is provided, the size will be `1` for all the chunks. * `chunk` {any} * Returns: {number} * Returns: {ReadableStream}