babel-helper-remap-async-to-generator
Advanced tools
Comparing version 7.0.0-alpha.9 to 7.0.0-alpha.10
@@ -48,6 +48,2 @@ "use strict"; | ||
Function: function Function(path) { | ||
if (path.isArrowFunctionExpression() && !path.node.async) { | ||
path.arrowFunctionToShadowed(); | ||
return; | ||
} | ||
path.skip(); | ||
@@ -108,6 +104,7 @@ }, | ||
var container = t.functionExpression(null, [], t.blockStatement(body.body), true); | ||
container.shadow = true; | ||
body.body = [t.returnStatement(t.callExpression(t.callExpression(callId, [container]), []))]; | ||
node.generator = false; | ||
path.get("body.body.0.argument.callee.arguments.0").unwrapFunctionEnvironment(); | ||
} | ||
@@ -122,3 +119,3 @@ | ||
if (path.isArrowFunctionExpression()) { | ||
path.arrowFunctionToShadowed(); | ||
path.arrowFunctionToExpression(); | ||
} else if (!isDeclaration && asyncFnId) { | ||
@@ -139,3 +136,3 @@ wrapper = namedBuildWrapper; | ||
var container = wrapper({ | ||
NAME: asyncFnId, | ||
NAME: asyncFnId || null, | ||
REF: path.scope.generateUidIdentifier("ref"), | ||
@@ -142,0 +139,0 @@ FUNCTION: built, |
{ | ||
"name": "babel-helper-remap-async-to-generator", | ||
"version": "7.0.0-alpha.9", | ||
"version": "7.0.0-alpha.10", | ||
"description": "Helper function to remap async functions to generators", | ||
@@ -9,7 +9,7 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-remap-async-to-generator", | ||
"dependencies": { | ||
"babel-template": "7.0.0-alpha.9", | ||
"babel-types": "7.0.0-alpha.9", | ||
"babel-traverse": "7.0.0-alpha.9", | ||
"babel-helper-function-name": "7.0.0-alpha.9" | ||
"babel-template": "7.0.0-alpha.10", | ||
"babel-types": "7.0.0-alpha.10", | ||
"babel-traverse": "7.0.0-alpha.10", | ||
"babel-helper-function-name": "7.0.0-alpha.10" | ||
} | ||
} |
9209
198
+ Addedbabel-helper-function-name@7.0.0-alpha.10(transitive)
+ Addedbabel-helper-get-function-arity@7.0.0-alpha.10(transitive)
+ Addedbabel-messages@7.0.0-alpha.10(transitive)
+ Addedbabel-template@7.0.0-alpha.10(transitive)
+ Addedbabel-traverse@7.0.0-alpha.10(transitive)
+ Addedbabel-types@7.0.0-alpha.10(transitive)
+ Addedbabylon@7.0.0-beta.10(transitive)
- Removedbabel-helper-function-name@7.0.0-alpha.9(transitive)
- Removedbabel-helper-get-function-arity@7.0.0-alpha.9(transitive)
- Removedbabel-messages@7.0.0-alpha.9(transitive)
- Removedbabel-template@7.0.0-alpha.9(transitive)
- Removedbabel-traverse@7.0.0-alpha.9(transitive)
- Removedbabel-types@7.0.0-alpha.9(transitive)
- Removedbabylon@7.0.0-beta.8(transitive)
Updatedbabel-types@7.0.0-alpha.10