Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/traverse

Package Overview
Dependencies
Maintainers
4
Versions
183
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/traverse - npm Package Compare versions

Comparing version 7.20.13 to 7.21.0

11

lib/visitors.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc