From 42b261bbdc968ad0049010055a70b3455a5e9ebf Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 10 Feb 2026 23:05:56 +0100 Subject: [PATCH 1/2] doc: fix methods being documented as properties in `process.md` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/61765 Reviewed-By: René Reviewed-By: Luigi Pinca --- doc/api/process.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index 1c04b53275516f..ec41b349c14443 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -907,7 +907,7 @@ changes: description: Change stability index for this feature from Experimental to Stable. --> -* Type: {number} +* Returns: {number} Gets the amount of free memory that is still available to the process (in bytes). @@ -1081,7 +1081,7 @@ changes: description: Aligned return value with `uv_get_constrained_memory`. --> -* Type: {number} +* Returns: {number} Gets the amount of memory available to the process (in bytes) based on limits imposed by the OS. If there is no such constraint, or the constraint From 04946a7a8cd6a0b8c1ffc78e860490dfd2defeef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9?= Date: Wed, 11 Feb 2026 02:15:43 +0000 Subject: [PATCH 2/2] stream: rename `Duplex.toWeb()` type option to `readableType` PR-URL: https://github.com/nodejs/node/pull/61632 Refs: https://github.com/nodejs/node/pull/58664 Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Mattias Buelens --- doc/api/deprecations.md | 16 ++++++++++++++++ doc/api/stream.md | 13 ++++++++++--- lib/internal/webstreams/adapters.js | 14 ++++++++++---- test/parallel/test-stream-duplex.js | 6 +++++- 4 files changed, 41 insertions(+), 8 deletions(-) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 78268b2b666138..bb8ca3e63e0096 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -4415,6 +4415,21 @@ import { opendir } from 'node:fs/promises'; } ``` +### DEP0201: Passing `options.type` to `Duplex.toWeb()` + + + +Type: Documentation-only + +Passing the `type` option to [`Duplex.toWeb()`][] is deprecated. To specify the +type of the readable half of the constructed readable-writable pair, use the +`readableType` option instead. + [DEP0142]: #dep0142-repl_builtinlibs [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 @@ -4433,6 +4448,7 @@ import { opendir } from 'node:fs/promises'; [`Buffer.isBuffer()`]: buffer.md#static-method-bufferisbufferobj [`Cipheriv`]: crypto.md#class-cipheriv [`Decipheriv`]: crypto.md#class-decipheriv +[`Duplex.toWeb()`]: stream.md#streamduplextowebstreamduplex-options [`Error.isError`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/isError [`REPLServer.clearBufferedCommand()`]: repl.md#replserverclearbufferedcommand [`ReadStream.open()`]: fs.md#class-fsreadstream diff --git a/doc/api/stream.md b/doc/api/stream.md index ef6dd51eabfd5e..73009939fe721b 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -3219,7 +3219,8 @@ changes: If no value is provided, the size will be `1` for all the chunks. * `chunk` {any} * Returns: {number} - * `type` {string} Must be 'bytes' or undefined. + * `type` {string} Specifies the type of the created `ReadableStream`. Must be + `'bytes'` or undefined. * Returns: {ReadableStream} ### `stream.Writable.fromWeb(writableStream[, options])` @@ -3398,9 +3399,13 @@ duplex.once('readable', () => console.log('readable', duplex.read()));