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

dependency-cruiser

Package Overview
Dependencies
Maintainers
1
Versions
536
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dependency-cruiser - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

src/extract/extractASync.js

2

package.json
{
"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": {

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