@@ -77,26 +77,25 @@ function findIssues (configuration, children, results) {
7777 if ( children ) {
7878 children . forEach ( function ( child ) {
7979 if (
80- ! configuration . productionOnly ||
81- ! child . dev
82- ) {
83- var result = resultForPackage ( configuration , child )
84- // Deduplicate.
85- var existing = results . find ( function ( existing ) {
86- return (
87- existing . name === result . name &&
88- existing . version === result . version
89- )
90- } )
91- if ( existing ) {
92- if ( existing . duplicates ) {
93- existing . duplicates . push ( result )
94- } else {
95- existing . duplicates = [ result ]
96- }
80+ configuration . productionOnly &&
81+ child . dev
82+ ) return
83+ var result = resultForPackage ( configuration , child )
84+ // Deduplicate.
85+ var existing = results . find ( function ( existing ) {
86+ return (
87+ existing . name === result . name &&
88+ existing . version === result . version
89+ )
90+ } )
91+ if ( existing ) {
92+ if ( existing . duplicates ) {
93+ existing . duplicates . push ( result )
9794 } else {
98- results . push ( result )
95+ existing . duplicates = [ result ]
9996 }
97+ } else {
98+ results . push ( result )
10099 }
101100 } )
102101 return results
@@ -105,14 +104,15 @@ function findIssues (configuration, children, results) {
105104
106105function resultForPackage ( configuration , tree ) {
107106 var packageAllowlist = configuration . packages || { }
107+ console . log ( '%s is %j' , 'tree.package' , tree . package )
108108 var result = {
109109 name : tree . name ,
110+ version : tree . version ,
110111 license : tree . package . license ,
111112 author : tree . package . author ,
112113 contributors : tree . package . contributors ,
113114 repository : tree . package . repository ,
114115 homepage : tree . package . homepage ,
115- version : tree . package . version ,
116116 parent : tree . parent ,
117117 path : tree . realpath
118118 }
0 commit comments