mwittig / npm-license-crawler

Analyzes license information for multiple node.js modules (package.json files) as part of your software project.
BSD 3-Clause "New" or "Revised" License
233 stars 45 forks source link

Different result when order of start array changes #19

Open tavarest opened 6 years ago

tavarest commented 6 years ago

I am currently trying to get the direct dependencies of a set of projects. I want to go to each project's folder, and simply analyze its package.json file. In the end, i want a csv file with all packages used and its license kind, without repeated packages.

I have set up npm-license-crawler with the following options:

{
  start: [
    path.join(__dirname, './../../../path1),
    path.join(__dirname, './../../../path2'),
    path.join(__dirname, './../../../path3'),
    path.join(__dirname, './../../../path4'),
    path.join(__dirname, './../../../path5'),
    path.join(__dirname, './../../../path6')
  ],
  onlyDirectDependencies: true,
  csv: path.join(__dirname, './../../output.csv')
}

When i run dumpLicenses and change the order of the paths in the start array, i get different results with some of the packages not being registered for a specific order.

I had to run npm-license-crawler individually for each project and then run another script to merge the results and remove repeated packages.

I might have misunderstood the package's usage, but I believe this behaviour is not expected.

mwittig commented 6 years ago

Sorry for the delay. I'll review your request shortly