LicenseFinder icon indicating copy to clipboard operation
LicenseFinder copied to clipboard

Yarn - Optional dependencies that arent used are shown as an unknown license

Open jessebs opened this issue 6 years ago • 1 comments

If I have an optional dependency that isn't applicable to the current system, license_finder will report an unknown license.

I can recreate with the following package.json and on Linux (Centos 7). fsevents is only applicable on macs.

{
  "name": "temporary",
  "version": "1.0.0",
  "description": "test project",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "optionalDependencies": {
    "fsevents": "^2.1.2"
  }
}

Running license finder, I get the following:

$ license_finder report
LicenseFinder::NPM: is active
LicenseFinder::Yarn: is active
fsevents, 2.1.2, unknown

The license is really MIT (https://www.npmjs.com/package/fsevents/v/2.1.2)

jessebs avatar Feb 18 '20 21:02 jessebs

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Feb 18 '20 21:02 cf-gitbot