Comparing version 0.0.6 to 0.0.7
27
deps.js
@@ -6,15 +6,7 @@ var dag = require('croc-dag') | ||
var _includePackage = function (name, packages) { | ||
return packages.indexOf(name) >= 0 || packages.length === 0 | ||
} | ||
exports.packages = function packages (opts) { | ||
var options = opts || {} | ||
exports.packages = function packages (strict) { | ||
var graph = new dag.DAG() | ||
var pkgs = list.packages(options.since) | ||
var pkgs = list.packages() | ||
Object.keys(pkgs) | ||
.filter(function (key) { | ||
return _includePackage(key, options.packages) | ||
}) | ||
.forEach(function (key) { | ||
@@ -32,7 +24,4 @@ var pkg = pkgs[key] | ||
.filter(function (dName) { | ||
return !options.strict || semver.satisfies(pkgs[dName].version, pkgDeps[dName]) | ||
return !strict || semver.satisfies(pkgs[dName].version, pkgDeps[dName]) | ||
}) | ||
.filter(function (dName) { | ||
return _includePackage(dName, options.packages) | ||
}) | ||
.forEach(function (dName) { | ||
@@ -48,1 +37,11 @@ graph.addEdge(pkg.name, dName, pkgDeps[dName]) | ||
} | ||
exports.getPredecessors = function (graph, packages) { | ||
var included = [] | ||
packages.forEach(function (name) { | ||
dag.alg.reverseDfs(graph, name).forEach(function (name) { | ||
included.push(name) | ||
}) | ||
}) | ||
return included | ||
} |
{ | ||
"name": "croc-deps", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "deps.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1667
2
39
1