dependency-cruiser
Advanced tools
Comparing version 2.2.0 to 2.2.1
{ | ||
"name": "dependency-cruiser", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -8,9 +8,15 @@ | ||
return Boolean(lToNode) && | ||
lToNode.hasOwnProperty("dependencies") && | ||
lToNode.dependencies.filter( | ||
pToToNodeName => !pVisited.has(pToToNodeName.resolved) | ||
/* about the absence of checks whether attributes/ objects actually | ||
* exist: | ||
* - it saves CPU cycles to the effect of being ~30% faster than with the | ||
* checks | ||
* - lToNode: is guaranteed to be there by the extract/ complete in index.js | ||
* - lToNode.dependencies is a mandatory attribute (as per json schema) | ||
* - pToToNode.resolved is a mandatory attribute (as per json schema) | ||
*/ | ||
return lToNode.dependencies.filter( | ||
pToToNode => !pVisited.has(pToToNode.resolved) | ||
).some( | ||
pToToNodeName => | ||
(pToToNodeName.hasOwnProperty("resolved") && pToToNodeName.resolved === pFrom) | ||
pToToNode => | ||
pToToNode.resolved === pFrom | ||
? true | ||
@@ -20,4 +26,4 @@ : relationEndsUpAtFrom( | ||
pFrom, | ||
pToToNodeName.resolved, | ||
pVisited.add(pToToNodeName.resolved) | ||
pToToNode.resolved, | ||
pVisited.add(pToToNode.resolved) | ||
) | ||
@@ -24,0 +30,0 @@ ); |
@@ -52,3 +52,3 @@ { | ||
"type": "boolean", | ||
"description": "Whether or not this is a dependency that can be followed any further. This is the case for core modules, json, and modules that could not be resolved to a file." | ||
"description": "Whether or not this is a dependency that can be followed any further. This will be 'false' for for core modules, json, and modules that could not be resolved to a file." | ||
}, | ||
@@ -55,0 +55,0 @@ "coreModule": { |
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
133050
56
2490
12