@babel/helper-member-expression-to-functions
Advanced tools
Comparing version 7.10.5 to 7.11.0
@@ -278,12 +278,19 @@ "use strict"; | ||
operator, | ||
right | ||
right: value | ||
} = parent; | ||
let value = right; | ||
if (operator !== "=") { | ||
this.memoise(member, 2); | ||
value = t.binaryExpression(operator.slice(0, -1), this.get(member), value); | ||
if (operator === "=") { | ||
parentPath.replaceWith(this.set(member, value)); | ||
} else { | ||
const operatorTrunc = operator.slice(0, -1); | ||
if (t.LOGICAL_OPERATORS.includes(operatorTrunc)) { | ||
this.memoise(member, 1); | ||
parentPath.replaceWith(t.logicalExpression(operatorTrunc, this.get(member), this.set(member, value))); | ||
} else { | ||
this.memoise(member, 2); | ||
parentPath.replaceWith(this.set(member, t.binaryExpression(operatorTrunc, this.get(member), value))); | ||
} | ||
} | ||
parentPath.replaceWith(this.set(member, value)); | ||
return; | ||
@@ -290,0 +297,0 @@ } |
{ | ||
"name": "@babel/helper-member-expression-to-functions", | ||
"version": "7.10.5", | ||
"version": "7.11.0", | ||
"description": "Helper function to replace certain member expressions with function calls", | ||
@@ -17,5 +17,4 @@ "repository": { | ||
"dependencies": { | ||
"@babel/types": "^7.10.5" | ||
}, | ||
"gitHead": "f7964a9ac51356f7df6404a25b27ba1cffba1ba7" | ||
"@babel/types": "^7.11.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12187
275
Updated@babel/types@^7.11.0