@babel/traverse
Advanced tools
Comparing version 7.20.13 to 7.21.0
@@ -13,2 +13,3 @@ "use strict"; | ||
DEPRECATED_KEYS, | ||
DEPRECATED_ALIASES, | ||
FLIPPED_ALIAS_KEYS, | ||
@@ -60,10 +61,14 @@ TYPES | ||
if (shouldIgnoreKey(nodeType)) continue; | ||
const fns = visitor[nodeType]; | ||
let aliases = FLIPPED_ALIAS_KEYS[nodeType]; | ||
const deprecatedKey = DEPRECATED_KEYS[nodeType]; | ||
if (deprecatedKey) { | ||
if (nodeType in DEPRECATED_KEYS) { | ||
const deprecatedKey = DEPRECATED_KEYS[nodeType]; | ||
console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecatedKey}`); | ||
aliases = [deprecatedKey]; | ||
} else if (nodeType in DEPRECATED_ALIASES) { | ||
const deprecatedAlias = DEPRECATED_ALIASES[nodeType]; | ||
console.trace(`Visitor defined for ${nodeType} but it has been renamed to ${deprecatedAlias}`); | ||
aliases = FLIPPED_ALIAS_KEYS[deprecatedAlias]; | ||
} | ||
if (!aliases) continue; | ||
const fns = visitor[nodeType]; | ||
delete visitor[nodeType]; | ||
@@ -70,0 +75,0 @@ for (const alias of aliases) { |
{ | ||
"name": "@babel/traverse", | ||
"version": "7.20.13", | ||
"version": "7.21.0", | ||
"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.18.6", | ||
"@babel/generator": "^7.20.7", | ||
"@babel/generator": "^7.21.0", | ||
"@babel/helper-environment-visitor": "^7.18.9", | ||
"@babel/helper-function-name": "^7.19.0", | ||
"@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.20.13", | ||
"@babel/types": "^7.20.7", | ||
"@babel/parser": "^7.21.0", | ||
"@babel/types": "^7.21.0", | ||
"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
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
579344
5036
Updated@babel/generator@^7.21.0
Updated@babel/parser@^7.21.0
Updated@babel/types@^7.21.0