@babel/helper-wrap-function
Advanced tools
Comparing version 7.12.13 to 7.13.0
@@ -57,3 +57,3 @@ "use strict"; | ||
function plainFunction(path, callId) { | ||
function plainFunction(path, callId, noNewArrows) { | ||
const node = path.node; | ||
@@ -65,3 +65,5 @@ const isDeclaration = path.isFunctionDeclaration(); | ||
if (path.isArrowFunctionExpression()) { | ||
path.arrowFunctionToExpression(); | ||
path.arrowFunctionToExpression({ | ||
noNewArrows | ||
}); | ||
} | ||
@@ -116,8 +118,8 @@ | ||
function wrapFunction(path, callId) { | ||
function wrapFunction(path, callId, noNewArrows = true) { | ||
if (path.isMethod()) { | ||
classOrObjectMethod(path, callId); | ||
} else { | ||
plainFunction(path, callId); | ||
plainFunction(path, callId, noNewArrows); | ||
} | ||
} |
{ | ||
"name": "@babel/helper-wrap-function", | ||
"version": "7.12.13", | ||
"version": "7.13.0", | ||
"description": "Helper to wrap functions inside a function call.", | ||
@@ -19,5 +19,5 @@ "repository": { | ||
"@babel/template": "^7.12.13", | ||
"@babel/traverse": "^7.12.13", | ||
"@babel/types": "^7.12.13" | ||
"@babel/traverse": "^7.13.0", | ||
"@babel/types": "^7.13.0" | ||
} | ||
} |
6187
101
3
Updated@babel/traverse@^7.13.0
Updated@babel/types@^7.13.0