From 00831f0293792425c258354171aa247fa80768e6 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 ee3202e0a7b4b7..efd76bf8287932 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -1275,9 +1275,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 bd0185c0446d7f..88193cd3b76219 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -38,7 +38,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; @@ -1040,7 +1039,6 @@ Readable.prototype.wrap = function(stream) { }; Readable.prototype[Symbol.asyncIterator] = function() { - emitExperimentalWarning('Readable[Symbol.asyncIterator]'); if (createReadableStreamAsyncIterator === undefined) { createReadableStreamAsyncIterator = require('internal/streams/async_iterator');