@snyk/dep-graph
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -240,3 +240,5 @@ "use strict"; | ||
const pathsFromNodeToRoot = this.pathsFromNodeToRoot(id, ancestors, opts); | ||
pathsFromNodeToRoot.forEach((path) => allPaths.push([pkgInfo].concat(path))); | ||
for (const path of pathsFromNodeToRoot) { | ||
allPaths.push([pkgInfo].concat(path)); | ||
} | ||
if (limit && allPaths.length >= limit) { | ||
@@ -243,0 +245,0 @@ break; |
@@ -42,3 +42,3 @@ export interface GraphOptions { | ||
nodeCount(): number; | ||
nodes(): any; | ||
nodes(): string[]; | ||
sources(): any; | ||
@@ -54,5 +54,5 @@ sinks(): any; | ||
parent(v: any): any; | ||
children(v: any): any; | ||
predecessors(v: any): any; | ||
successors(v: any): any; | ||
children(v: any): string[] | undefined; | ||
predecessors(v: any): string[] | undefined; | ||
successors(v: any): string[] | undefined; | ||
neighbors(v: any): any; | ||
@@ -59,0 +59,0 @@ isLeaf(v: any): boolean; |
@@ -12,3 +12,2 @@ "use strict"; | ||
const isUndefined = require("lodash.isundefined"); | ||
const keys = require("lodash.keys"); | ||
const reduce = require("lodash.reduce"); | ||
@@ -96,3 +95,3 @@ const union = require("lodash.union"); | ||
nodes() { | ||
return keys(this._nodes); | ||
return Object.keys(this._nodes); | ||
} | ||
@@ -165,6 +164,6 @@ sources() { | ||
} | ||
each(keys(this._in[v]), removeEdge); | ||
each(Object.keys(this._in[v]), removeEdge); | ||
delete this._in[v]; | ||
delete this._preds[v]; | ||
each(keys(this._out[v]), removeEdge); | ||
each(Object.keys(this._out[v]), removeEdge); | ||
delete this._out[v]; | ||
@@ -221,3 +220,3 @@ delete this._sucs[v]; | ||
if (children) { | ||
return keys(children); | ||
return Object.keys(children); | ||
} | ||
@@ -235,3 +234,3 @@ } | ||
if (predsV) { | ||
return keys(predsV); | ||
return Object.keys(predsV); | ||
} | ||
@@ -242,3 +241,3 @@ } | ||
if (sucsV) { | ||
return keys(sucsV); | ||
return Object.keys(sucsV); | ||
} | ||
@@ -245,0 +244,0 @@ } |
@@ -60,3 +60,2 @@ { | ||
"lodash.isundefined": "^3.0.1", | ||
"lodash.keys": "^4.2.0", | ||
"lodash.map": "^4.6.0", | ||
@@ -72,3 +71,3 @@ "lodash.reduce": "^4.6.0", | ||
}, | ||
"version": "2.0.0" | ||
"version": "2.1.0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
118277
18
1777
- Removedlodash.keys@^4.2.0
- Removedlodash.keys@4.2.0(transitive)