From 40da7c5d6ab545368ac967339ea253d509ade117 Mon Sep 17 00:00:00 2001 From: Debadree Chatterjee Date: Mon, 23 Jan 2023 13:52:47 +0530 Subject: [PATCH 1/4] doc: include webstreams in finished() and Duplex.from() parameters --- doc/api/stream.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 4dbb84a7a6bb1f..92c3ebd7b6e678 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2622,7 +2622,7 @@ changes: finished before the call to `finished(stream, cb)`. --> -* `stream` {Stream} A readable and/or writable stream. +* `stream` {Stream|ReadableStream|WritableStream} A readable and/or writable stream/webstream. * `options` {Object} * `error` {boolean} If set to `false`, then a call to `emit('error', err)` is @@ -3034,7 +3034,7 @@ added: v16.8.0 --> * `src` {Stream|Blob|ArrayBuffer|string|Iterable|AsyncIterable| - AsyncGeneratorFunction|AsyncFunction|Promise|Object} + AsyncGeneratorFunction|AsyncFunction|Promise|Object|ReadableStream|WritableStream} A utility method for creating duplex streams. @@ -3054,6 +3054,8 @@ A utility method for creating duplex streams. `writable` into `Stream` and then combines them into `Duplex` where the `Duplex` will write to the `writable` and read from the `readable`. * `Promise` converts into readable `Duplex`. Value `null` is ignored. +* `ReadableStream` converts into readable `Duplex`. +* `WritableStream` converts into writable `Duplex`. * Returns: {stream.Duplex} If an `Iterable` object containing promises is passed as an argument, From 032b141f1280f31ac0ba75b9679babf808a6cc5b Mon Sep 17 00:00:00 2001 From: Debadree Chatterjee Date: Mon, 23 Jan 2023 14:35:34 +0530 Subject: [PATCH 2/4] fixup! add version info for finished --- doc/api/stream.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/stream.md b/doc/api/stream.md index 92c3ebd7b6e678..a5384d20ccd99f 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2603,6 +2603,9 @@ further errors except from `_destroy()` may be emitted as `'error'`. * `src` {Stream|Blob|ArrayBuffer|string|Iterable|AsyncIterable| From 4dadf3bbb00e9fe414d67269fb4a78c25426daf1 Mon Sep 17 00:00:00 2001 From: Debadree Chatterjee Date: Mon, 23 Jan 2023 14:44:50 +0530 Subject: [PATCH 4/4] fixup! lint --- doc/api/stream.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 497b04eb868b4c..5a9a44d5c0fb75 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2625,7 +2625,9 @@ changes: finished before the call to `finished(stream, cb)`. --> -* `stream` {Stream|ReadableStream|WritableStream} A readable and/or writable stream/webstream. +* `stream` {Stream|ReadableStream|WritableStream} + +A readable and/or writable stream/webstream. * `options` {Object} * `error` {boolean} If set to `false`, then a call to `emit('error', err)` is @@ -3042,7 +3044,8 @@ changes: --> * `src` {Stream|Blob|ArrayBuffer|string|Iterable|AsyncIterable| - AsyncGeneratorFunction|AsyncFunction|Promise|Object|ReadableStream|WritableStream} + AsyncGeneratorFunction|AsyncFunction|Promise|Object| + ReadableStream|WritableStream} A utility method for creating duplex streams.