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

ast-types

Package Overview
Dependencies
Maintainers
1
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ast-types - npm Package Compare versions

Comparing version 0.4.10 to 0.4.11

22

lib/traverse.js
var visit = require("./path-visitor").visit;
var warnedAboutDeprecation = false;
var deprecate = require("depd")('require("ast-types").traverse');
function traverseWithFullPathInfo(node, callback) {
if (!warnedAboutDeprecation) {
warnedAboutDeprecation = true;
console.warn(
"\033[33m", // yellow
'DEPRECATED(ast-types): Please use require("ast-types").visit ' +
"instead of .traverse for syntax tree manipulation." +
"\033[0m" // reset
);
}
return visit(node, {

@@ -26,3 +16,9 @@ visitNode: function(path) {

traverseWithFullPathInfo.fast = traverseWithFullPathInfo;
module.exports = traverseWithFullPathInfo;
var deprecatedWrapper = deprecate.function(
traverseWithFullPathInfo,
'Please use require("ast-types").visit instead of .traverse for ' +
'syntax tree manipulation'
);
deprecatedWrapper.fast = deprecatedWrapper;
module.exports = deprecatedWrapper;

@@ -21,3 +21,3 @@ {

],
"version": "0.4.10",
"version": "0.4.11",
"homepage": "http://github.com/benjamn/ast-types",

@@ -33,2 +33,5 @@ "repository": {

},
"dependencies": {
"depd": "~1.0.0"
},
"devDependencies": {

@@ -35,0 +38,0 @@ "esprima": "~1.2.2",

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