Skip to content

Commit 53bd8b2

Browse files
committed
Fix incorrect Arborist API call
See #77 (comment)
1 parent 3117239 commit 53bd8b2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ function licensee (configuration, path, callback) {
3636
var arborist = new Arborist({ path })
3737
arborist.loadActual({ forceActual: true })
3838
.then(function (tree) {
39-
var dependencies = Array.from(tree.children.values())
39+
var dependencies = Array.from(tree.inventory.values())
40+
.filter(function (dependency) {
41+
return !dependency.isProjectRoot
42+
})
4043
if (configuration.filterPackages) {
4144
dependencies = configuration.filterPackages(dependencies)
4245
}

0 commit comments

Comments
 (0)