ast-types
Advanced tools
Comparing version 0.4.10 to 0.4.11
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", |
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
106950
1
2498
+ Addeddepd@~1.0.0
+ Addeddepd@1.0.1(transitive)