@babel/plugin-proposal-async-generator-functions
Advanced tools
Comparing version 7.14.7 to 7.14.9
@@ -12,3 +12,3 @@ "use strict"; | ||
async function wrapper() { | ||
var ITERATOR_COMPLETION = true; | ||
var ITERATOR_ABRUPT_COMPLETION = false; | ||
var ITERATOR_HAD_ERROR_KEY = false; | ||
@@ -18,10 +18,6 @@ var ITERATOR_ERROR_KEY; | ||
for ( | ||
var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY, STEP_VALUE; | ||
( | ||
STEP_KEY = await ITERATOR_KEY.next(), | ||
ITERATOR_COMPLETION = STEP_KEY.done, | ||
STEP_VALUE = await STEP_KEY.value, | ||
!ITERATOR_COMPLETION | ||
); | ||
ITERATOR_COMPLETION = true) { | ||
var ITERATOR_KEY = GET_ITERATOR(OBJECT), STEP_KEY; | ||
ITERATOR_ABRUPT_COMPLETION = !(STEP_KEY = await ITERATOR_KEY.next()).done; | ||
ITERATOR_ABRUPT_COMPLETION = false | ||
) { | ||
} | ||
@@ -33,3 +29,3 @@ } catch (err) { | ||
try { | ||
if (!ITERATOR_COMPLETION && ITERATOR_KEY.return != null) { | ||
if (ITERATOR_ABRUPT_COMPLETION && ITERATOR_KEY.return != null) { | ||
await ITERATOR_KEY.return(); | ||
@@ -55,3 +51,5 @@ } | ||
const stepKey = scope.generateUidIdentifier("step"); | ||
const stepValue = scope.generateUidIdentifier("value"); | ||
const stepValue = _core.types.memberExpression(stepKey, _core.types.identifier("value")); | ||
const left = node.left; | ||
@@ -68,3 +66,3 @@ let declar; | ||
ITERATOR_HAD_ERROR_KEY: scope.generateUidIdentifier("didIteratorError"), | ||
ITERATOR_COMPLETION: scope.generateUidIdentifier("iteratorNormalCompletion"), | ||
ITERATOR_ABRUPT_COMPLETION: scope.generateUidIdentifier("iteratorAbruptCompletion"), | ||
ITERATOR_ERROR_KEY: scope.generateUidIdentifier("iteratorError"), | ||
@@ -74,4 +72,3 @@ ITERATOR_KEY: scope.generateUidIdentifier("iterator"), | ||
OBJECT: node.right, | ||
STEP_VALUE: _core.types.cloneNode(stepValue), | ||
STEP_KEY: stepKey | ||
STEP_KEY: _core.types.cloneNode(stepKey) | ||
}); | ||
@@ -78,0 +75,0 @@ template = template.body.body; |
{ | ||
"name": "@babel/plugin-proposal-async-generator-functions", | ||
"version": "7.14.7", | ||
"version": "7.14.9", | ||
"description": "Turn async generator functions into ES2015 generators", | ||
@@ -28,6 +28,6 @@ "repository": { | ||
"devDependencies": { | ||
"@babel/core": "7.14.6", | ||
"@babel/core": "7.14.8", | ||
"@babel/helper-plugin-test-runner": "7.14.5", | ||
"babel-plugin-polyfill-corejs3": "^0.2.2", | ||
"core-js-pure": "^3.15.0" | ||
"core-js-pure": "^3.16.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "engines": { |
7463
152