@babel/traverse
Advanced tools
Comparing version 7.18.11 to 7.18.13
@@ -270,2 +270,7 @@ "use strict"; | ||
return left && right; | ||
case "??": | ||
state.confident = leftConfident && (left != null || rightConfident); | ||
if (!state.confident) return; | ||
return left != null ? left : right; | ||
} | ||
@@ -272,0 +277,0 @@ } |
@@ -33,3 +33,3 @@ "use strict"; | ||
}, function (self, parent) { | ||
if (parent.isIfStatement() && (self.key === "consequent" || self.key === "alternate") || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) { | ||
if (parent.isIfStatement() && self.key === "consequent" || self.key === "body" && (parent.isLoop() || parent.isArrowFunctionExpression())) { | ||
self.replaceWith({ | ||
@@ -36,0 +36,0 @@ type: "BlockStatement", |
@@ -162,3 +162,3 @@ "use strict"; | ||
const nodeVisitor = rootVisitor[type] = rootVisitor[type] || {}; | ||
const nodeVisitor = rootVisitor[type] || (rootVisitor[type] = {}); | ||
mergePair(nodeVisitor, visitorType); | ||
@@ -165,0 +165,0 @@ } |
{ | ||
"name": "@babel/traverse", | ||
"version": "7.18.11", | ||
"version": "7.18.13", | ||
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", | ||
@@ -20,3 +20,3 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"@babel/code-frame": "^7.18.6", | ||
"@babel/generator": "^7.18.10", | ||
"@babel/generator": "^7.18.13", | ||
"@babel/helper-environment-visitor": "^7.18.9", | ||
@@ -26,4 +26,4 @@ "@babel/helper-function-name": "^7.18.9", | ||
"@babel/helper-split-export-declaration": "^7.18.6", | ||
"@babel/parser": "^7.18.11", | ||
"@babel/types": "^7.18.10", | ||
"@babel/parser": "^7.18.13", | ||
"@babel/types": "^7.18.13", | ||
"debug": "^4.1.0", | ||
@@ -30,0 +30,0 @@ "globals": "^11.1.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
156652
4961
Updated@babel/generator@^7.18.13
Updated@babel/parser@^7.18.13
Updated@babel/types@^7.18.13