Updating NPM dependencies
This commit is contained in:
12
node_modules/@babel/traverse/lib/index.js
generated
vendored
12
node_modules/@babel/traverse/lib/index.js
generated
vendored
@@ -30,8 +30,6 @@ var visitors = _interopRequireWildcard(require("./visitors"));
|
||||
|
||||
exports.visitors = visitors;
|
||||
|
||||
var _includes = _interopRequireDefault(require("lodash/includes"));
|
||||
|
||||
var t = _interopRequireWildcard(require("@babel/types"));
|
||||
|
||||
var cache = _interopRequireWildcard(require("./cache"));
|
||||
@@ -95,15 +93,15 @@ traverse.removeProperties = function (tree, opts) {
|
||||
return tree;
|
||||
};
|
||||
|
||||
function hasBlacklistedType(path, state) {
|
||||
function hasDenylistedType(path, state) {
|
||||
if (path.node.type === state.type) {
|
||||
state.has = true;
|
||||
path.stop();
|
||||
}
|
||||
}
|
||||
|
||||
traverse.hasType = function (tree, type, blacklistTypes) {
|
||||
if ((0, _includes.default)(blacklistTypes, tree.type)) return false;
|
||||
traverse.hasType = function (tree, type, denylistTypes) {
|
||||
if (denylistTypes == null ? void 0 : denylistTypes.includes(tree.type)) return false;
|
||||
if (tree.type === type) return true;
|
||||
const state = {
|
||||
has: false,
|
||||
@@ -111,8 +109,8 @@ traverse.hasType = function (tree, type, blacklistTypes) {
|
||||
};
|
||||
traverse(tree, {
|
||||
noScope: true,
|
||||
blacklist: blacklistTypes,
|
||||
enter: hasBlacklistedType
|
||||
denylist: denylistTypes,
|
||||
enter: hasDenylistedType
|
||||
}, null, state);
|
||||
return state.has;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user