@babel/helper-check-duplicate-nodes
Advanced tools
Comparing version 7.18.6 to 7.21.4-esm
@@ -7,9 +7,6 @@ "use strict"; | ||
exports.default = checkDuplicateNodes; | ||
var _t = require("@babel/types"); | ||
const { | ||
VISITOR_KEYS | ||
} = _t; | ||
function checkDuplicateNodes(ast) { | ||
@@ -19,5 +16,3 @@ if (arguments.length !== 1) { | ||
} | ||
const parentsMap = new Map(); | ||
const hidePrivateProperties = (key, val) => { | ||
@@ -27,3 +22,2 @@ if (key[0] === "_") return "[Private]"; | ||
}; | ||
const stack = [{ | ||
@@ -34,3 +28,2 @@ node: ast, | ||
let item; | ||
while ((item = stack.pop()) !== undefined) { | ||
@@ -44,3 +37,2 @@ const { | ||
if (!keys) continue; | ||
if (parentsMap.has(node)) { | ||
@@ -50,8 +42,5 @@ const parents = [parentsMap.get(node), parent]; | ||
} | ||
parentsMap.set(node, parent); | ||
for (const key of keys) { | ||
const subNode = node[key]; | ||
if (Array.isArray(subNode)) { | ||
@@ -72,2 +61,4 @@ for (const child of subNode) { | ||
} | ||
} | ||
} | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@babel/helper-check-duplicate-nodes", | ||
"version": "7.18.6", | ||
"version": "7.21.4-esm", | ||
"description": "Babel helper module for babel transforms authors to check the AST against duplicated nodes.", | ||
@@ -31,8 +31,8 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@babel/types": "^7.18.6" | ||
"@babel/types": "^7.21.4-esm" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.18.6" | ||
"@babel/core": "^7.21.4-esm" | ||
}, | ||
"type": "commonjs" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
7819
6
55
1
Updated@babel/types@^7.21.4-esm