@babel/plugin-proposal-logical-assignment-operators
Advanced tools
Comparing version 7.10.4 to 7.11.0
@@ -32,4 +32,5 @@ "use strict"; | ||
} = node; | ||
const operatorTrunc = operator.slice(0, -1); | ||
if (operator !== "||=" && operator !== "&&=" && operator !== "??=") { | ||
if (!_core.types.LOGICAL_OPERATORS.includes(operatorTrunc)) { | ||
return; | ||
@@ -63,3 +64,3 @@ } | ||
path.replaceWith(_core.types.logicalExpression(operator.slice(0, -1), lhs, _core.types.assignmentExpression("=", left, right))); | ||
path.replaceWith(_core.types.logicalExpression(operatorTrunc, lhs, _core.types.assignmentExpression("=", left, right))); | ||
} | ||
@@ -66,0 +67,0 @@ |
{ | ||
"name": "@babel/plugin-proposal-logical-assignment-operators", | ||
"version": "7.10.4", | ||
"version": "7.11.0", | ||
"description": "Transforms logical assignment operators into short-circuited assignments", | ||
@@ -26,3 +26,3 @@ "repository": { | ||
"devDependencies": { | ||
"@babel/core": "^7.10.4", | ||
"@babel/core": "^7.11.0", | ||
"@babel/helper-plugin-test-runner": "^7.10.4", | ||
@@ -32,3 +32,3 @@ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4", | ||
}, | ||
"gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df" | ||
"gitHead": "38dda069eeac2e31bce3f56290998d30bee1ed6b" | ||
} |
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
4514
54