From 02e4b78b98a7828a938cccdf14db648ebe6bdd48 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Mon, 26 Aug 2024 12:44:56 +0200 Subject: [PATCH 1/2] Add async iterators and the for await..of loop --- features/async-iterators.yml | 13 +++++++ features/async-iterators.yml.dist | 57 +++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 features/async-iterators.yml create mode 100644 features/async-iterators.yml.dist diff --git a/features/async-iterators.yml b/features/async-iterators.yml new file mode 100644 index 00000000000..de969327a7c --- /dev/null +++ b/features/async-iterators.yml @@ -0,0 +1,13 @@ +name: Async iterators and the for await..of loop +description: The `for await .. of` loop handles asynchronous data when working with async iterables like Promises or Generators. +group: iterators +snapshot: ecmascript-2018 +spec: + - https://tc39.es/ecma262/multipage/control-abstraction-objects.html#sec-asynciteratorprototype + - https://tc39.es/ecma262/multipage/ecmascript-language-statements-and-declarations.html#sec-for-in-and-for-of-statements +compat_features: + - javascript.builtins.AsyncIterator + - javascript.builtins.AsyncIterator.@@asyncIterator + - javascript.builtins.Symbol.asyncIterator + - javascript.statements.for_await_of + - javascript.statements.for_of.async_iterators diff --git a/features/async-iterators.yml.dist b/features/async-iterators.yml.dist new file mode 100644 index 00000000000..e9d00b3e3f7 --- /dev/null +++ b/features/async-iterators.yml.dist @@ -0,0 +1,57 @@ +# Generated from: async-iterators.yml +# Do not edit this file by hand. Edit the source file instead! + +status: + baseline: high + baseline_low_date: 2020-01-15 + baseline_high_date: 2022-07-15 + support: + chrome: "63" + chrome_android: "63" + edge: "79" + firefox: "57" + firefox_android: "57" + safari: "12" + safari_ios: "12" +compat_features: + # baseline: high + # baseline_low_date: 2017-12-06 + # baseline_high_date: 2020-06-06 + # support: + # chrome: "63" + # chrome_android: "63" + # edge: "12" + # firefox: "57" + # firefox_android: "57" + # safari: "7" + # safari_ios: "7" + - javascript.statements.for_of.async_iterators + + # baseline: high + # baseline_low_date: 2020-01-15 + # baseline_high_date: 2022-07-15 + # support: + # chrome: "63" + # chrome_android: "63" + # edge: "79" + # firefox: "57" + # firefox_android: "57" + # safari: "11.1" + # safari_ios: "11.3" + - javascript.builtins.AsyncIterator + - javascript.builtins.AsyncIterator.@@asyncIterator + - javascript.builtins.Symbol.asyncIterator + + # ⬇️ Same status as overall feature ⬇️ + # baseline: high + # baseline_low_date: 2020-01-15 + # baseline_high_date: 2022-07-15 + # support: + # chrome: "63" + # chrome_android: "63" + # edge: "79" + # firefox: "57" + # firefox_android: "57" + # safari: "12" + # safari_ios: "12" + - javascript.statements.for_await_of From e85e1eaf83d69811265b01caec400af5e15e44d7 Mon Sep 17 00:00:00 2001 From: Florian Scholz Date: Thu, 5 Sep 2024 16:08:02 +0200 Subject: [PATCH 2/2] Update features/async-iterators.yml Co-authored-by: Patrick Brosset --- features/async-iterators.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/async-iterators.yml b/features/async-iterators.yml index de969327a7c..21334e998f4 100644 --- a/features/async-iterators.yml +++ b/features/async-iterators.yml @@ -1,5 +1,5 @@ name: Async iterators and the for await..of loop -description: The `for await .. of` loop handles asynchronous data when working with async iterables like Promises or Generators. +description: Asynchronous iterator objects, such as those returned by promises or generator functions, are iterable with the `for await .. of` loop. group: iterators snapshot: ecmascript-2018 spec: