tophat / yarn-plugin-licenses

Audit your dependency licenses with this yarn berry plugin
Apache License 2.0
26 stars 7 forks source link

fix: fall back on deprecated object license (#15) #19

Closed Kurt-von-Laven closed 3 years ago

Kurt-von-Laven commented 3 years ago

Description

Introduce support for the deprecated license object format, meaning we can now parse licenses that look like this:

{
  "license" : {
    "type" : "ISC",
    "url" : "https://opensource.org/licenses/ISC"
  }
}

Improve support for the deprecated licenses array format by joining the licenses in the array with OR rather than AND. That format looks like this:

{
  "licenses" : [
    {
      "type": "MIT",
      "url": "https://www.opensource.org/licenses/mit-license.php"
    },
    {
      "type": "Apache-2.0",
      "url": "https://opensource.org/licenses/apache2.0.php"
    }
  ]
}

Related Issues

Checklist

codecov[bot] commented 3 years ago

Codecov Report

Merging #19 (8b36e92) into master (129a926) will not change coverage. The diff coverage is 0.00%.

@@          Coverage Diff           @@
##           master     #19   +/-   ##
======================================
  Coverage    4.45%   4.45%           
======================================
  Files           2       2           
  Lines         157     157           
  Branches       41      42    +1     
======================================
  Hits            7       7           
  Misses        150     150