From b29afa212ac2ea7e3be59bb1a886f0e014c32c1a Mon Sep 17 00:00:00 2001 From: Matteo Collina Date: Fri, 29 Mar 2019 17:14:48 +0100 Subject: [PATCH] stream: make Symbol.asyncIterator support stable PR-URL: https://github.com/nodejs/node/pull/26989 Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: James M Snell Reviewed-By: Masashi Hirano Reviewed-By: Anna Henningsen Reviewed-By: Benjamin Gruenbaum --- doc/api/stream.md | 6 +++++- lib/_stream_readable.js | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/api/stream.md b/doc/api/stream.md index 66627abf6a9b8d..6ac3c18dff4df6 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1286,9 +1286,13 @@ myReader.on('readable', () => { ##### readable\[Symbol.asyncIterator\]() -> Stability: 1 - Experimental +> Stability: 2 - Stable * Returns: {AsyncIterator} to fully consume the stream. diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 5f8b4a00d9609f..93621562638c30 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -46,7 +46,6 @@ const { ERR_METHOD_NOT_IMPLEMENTED, ERR_STREAM_UNSHIFT_AFTER_END_EVENT } = require('internal/errors').codes; -const { emitExperimentalWarning } = require('internal/util'); // Lazy loaded to improve the startup performance. let StringDecoder; @@ -1036,7 +1035,6 @@ Readable.prototype.wrap = function(stream) { }; Readable.prototype[Symbol.asyncIterator] = function() { - emitExperimentalWarning('Readable[Symbol.asyncIterator]'); if (createReadableStreamAsyncIterator === undefined) { createReadableStreamAsyncIterator = require('internal/streams/async_iterator');