@babel/traverse
Advanced tools
Comparing version 7.25.3 to 7.25.4
@@ -102,5 +102,14 @@ "use strict"; | ||
const blockToTraverse = arguments[0] || scope.block; | ||
(0, _traverseNode.traverseNode)(blockToTraverse, (0, _visitors.explode)(renameVisitor), scope, this, scope.path, { | ||
const skipKeys = { | ||
discriminant: true | ||
}); | ||
}; | ||
if (t.isMethod(blockToTraverse)) { | ||
if (blockToTraverse.computed) { | ||
skipKeys.key = true; | ||
} | ||
if (!t.isObjectMethod(blockToTraverse)) { | ||
skipKeys.decorators = true; | ||
} | ||
} | ||
(0, _traverseNode.traverseNode)(blockToTraverse, (0, _visitors.explode)(renameVisitor), scope, this, scope.path, skipKeys); | ||
if (!arguments[0]) { | ||
@@ -107,0 +116,0 @@ scope.removeOwnBinding(oldName); |
@@ -107,3 +107,3 @@ "use strict"; | ||
if (!TYPES.includes(nodeType)) { | ||
throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse ${"7.25.3"}`); | ||
throw new Error(`You gave us a visitor for the node type ${nodeType} but it's not a valid type in @babel/traverse ${"7.25.4"}`); | ||
} | ||
@@ -110,0 +110,0 @@ const visitors = visitor[nodeType]; |
{ | ||
"name": "@babel/traverse", | ||
"version": "7.25.3", | ||
"version": "7.25.4", | ||
"description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", | ||
@@ -20,6 +20,6 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"@babel/code-frame": "^7.24.7", | ||
"@babel/generator": "^7.25.0", | ||
"@babel/parser": "^7.25.3", | ||
"@babel/generator": "^7.25.4", | ||
"@babel/parser": "^7.25.4", | ||
"@babel/template": "^7.25.0", | ||
"@babel/types": "^7.25.2", | ||
"@babel/types": "^7.25.4", | ||
"debug": "^4.3.1", | ||
@@ -26,0 +26,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
727552
63
5617
30
Updated@babel/generator@^7.25.4
Updated@babel/parser@^7.25.4
Updated@babel/types@^7.25.4