@babel/traverse
Advanced tools
Comparing version 7.21.4 to 7.21.5
@@ -70,2 +70,3 @@ "use strict"; | ||
function visit() { | ||
var _this$opts$shouldSkip, _this$opts; | ||
if (!this.node) { | ||
@@ -77,3 +78,3 @@ return false; | ||
} | ||
if (this.opts.shouldSkip && this.opts.shouldSkip(this)) { | ||
if ((_this$opts$shouldSkip = (_this$opts = this.opts).shouldSkip) != null && _this$opts$shouldSkip.call(_this$opts, this)) { | ||
return false; | ||
@@ -106,3 +107,4 @@ } | ||
function setScope() { | ||
if (this.opts && this.opts.noScope) return; | ||
var _this$opts2, _this$scope; | ||
if ((_this$opts2 = this.opts) != null && _this$opts2.noScope) return; | ||
let path = this.parentPath; | ||
@@ -114,3 +116,4 @@ if ((this.key === "key" || this.listKey === "decorators") && path.isMethod() || this.key === "discriminant" && path.isSwitchStatement()) { | ||
while (path && !target) { | ||
if (path.opts && path.opts.noScope) return; | ||
var _path$opts; | ||
if ((_path$opts = path.opts) != null && _path$opts.noScope) return; | ||
target = path.scope; | ||
@@ -120,3 +123,3 @@ path = path.parentPath; | ||
this.scope = this.getScope(target); | ||
if (this.scope) this.scope.init(); | ||
(_this$scope = this.scope) == null ? void 0 : _this$scope.init(); | ||
} | ||
@@ -123,0 +126,0 @@ function setContext(context) { |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports.arrowFunctionToExpression = arrowFunctionToExpression; | ||
exports.arrowFunctionToShadowed = arrowFunctionToShadowed; | ||
exports.ensureBlock = ensureBlock; | ||
@@ -92,5 +91,9 @@ exports.toComputedKey = toComputedKey; | ||
} | ||
function arrowFunctionToShadowed() { | ||
if (!this.isArrowFunctionExpression()) return; | ||
this.arrowFunctionToExpression(); | ||
{ | ||
{ | ||
exports.arrowFunctionToShadowed = function () { | ||
if (!this.isArrowFunctionExpression()) return; | ||
this.arrowFunctionToExpression(); | ||
}; | ||
} | ||
} | ||
@@ -109,4 +112,6 @@ function unwrapFunctionEnvironment() { | ||
allowInsertArrowWithRest = allowInsertArrow, | ||
specCompliant = false, | ||
noNewArrows = !specCompliant | ||
noNewArrows = !(() => { | ||
var _arguments$; | ||
return (_arguments$ = arguments[0]) == null ? void 0 : _arguments$.specCompliant; | ||
})() | ||
} = {}) { | ||
@@ -113,0 +118,0 @@ if (!this.isArrowFunctionExpression()) { |
@@ -191,5 +191,10 @@ "use strict"; | ||
if (key === "enter" || key === "exit" || key === "shouldSkip") return true; | ||
if (key === "denylist" || key === "noScope" || key === "skipKeys" || key === "blacklist") { | ||
if (key === "denylist" || key === "noScope" || key === "skipKeys") { | ||
return true; | ||
} | ||
{ | ||
if (key === "blacklist") { | ||
return true; | ||
} | ||
} | ||
return false; | ||
@@ -196,0 +201,0 @@ } |
{ | ||
"name": "@babel/traverse", | ||
"version": "7.21.4", | ||
"version": "7.21.5", | ||
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", | ||
@@ -20,9 +20,9 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"@babel/code-frame": "^7.21.4", | ||
"@babel/generator": "^7.21.4", | ||
"@babel/helper-environment-visitor": "^7.18.9", | ||
"@babel/generator": "^7.21.5", | ||
"@babel/helper-environment-visitor": "^7.21.5", | ||
"@babel/helper-function-name": "^7.21.0", | ||
"@babel/helper-hoist-variables": "^7.18.6", | ||
"@babel/helper-split-export-declaration": "^7.18.6", | ||
"@babel/parser": "^7.21.4", | ||
"@babel/types": "^7.21.4", | ||
"@babel/parser": "^7.21.5", | ||
"@babel/types": "^7.21.5", | ||
"debug": "^4.1.0", | ||
@@ -29,0 +29,0 @@ "globals": "^11.1.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
587727
5077
7
29
Updated@babel/generator@^7.21.5
Updated@babel/parser@^7.21.5
Updated@babel/types@^7.21.5