@babel/traverse
Advanced tools
Comparing version 7.19.3 to 7.19.4
@@ -28,2 +28,9 @@ "use strict"; | ||
this.kind = kind; | ||
if ((kind === "var" || kind === "hoisted") && isDeclaredInLoop(path || (() => { | ||
throw new Error("Internal Babel error: unreachable "); | ||
})())) { | ||
this.reassign(path); | ||
} | ||
this.clearValue(); | ||
@@ -78,2 +85,20 @@ } | ||
function isDeclaredInLoop(path) { | ||
for (let { | ||
parentPath, | ||
key | ||
} = path; parentPath; ({ | ||
parentPath, | ||
key | ||
} = parentPath)) { | ||
if (parentPath.isFunctionParent()) return false; | ||
if (parentPath.isWhile() || parentPath.isForXStatement() || parentPath.isForStatement() && key === "body") { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
//# sourceMappingURL=binding.js.map |
{ | ||
"name": "@babel/traverse", | ||
"version": "7.19.3", | ||
"version": "7.19.4", | ||
"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.19.3", | ||
"@babel/generator": "^7.19.4", | ||
"@babel/helper-environment-visitor": "^7.18.9", | ||
@@ -26,4 +26,4 @@ "@babel/helper-function-name": "^7.19.0", | ||
"@babel/helper-split-export-declaration": "^7.18.6", | ||
"@babel/parser": "^7.19.3", | ||
"@babel/types": "^7.19.3", | ||
"@babel/parser": "^7.19.4", | ||
"@babel/types": "^7.19.4", | ||
"debug": "^4.1.0", | ||
@@ -30,0 +30,0 @@ "globals": "^11.1.0" |
Sorry, the diff of this file is not supported yet
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
567260
5033
29
Updated@babel/generator@^7.19.4
Updated@babel/parser@^7.19.4
Updated@babel/types@^7.19.4