licenses icon indicating copy to clipboard operation
licenses copied to clipboard

Doesn't understand `colors`

Open Raynos opened this issue 10 years ago • 3 comments

licences thinks colors does not have a licence.

It in fact has one checked into git ( https://github.com/Marak/colors.js/blob/master/MIT-LICENSE.txt )

Raynos avatar Apr 01 '14 08:04 Raynos

@Raynos I think you ran out API calls for the GITHUB api which is why these packages show up as no license (as no data can be retrieved from github)..

I get the following output:

licensing --name colors                                                                                                         

Resolving dependencies, this might take a while

colors is licensed as: MIT

Licenses information:


Found a module that is incorrectly or not detected at all but does
have a valid license? Please report this at:

https://github.com/3rd-Eden/licenses/issues/new

Which is the library that does the actual parsing and detection of
the license so we can improve it's parsing algorithm and yield
better results.

And when I run it with DEBUG=* licenses --name colors it will indeed check the MIT-LICENSE.txt file:

  mana:npm-registry adding an `all` callback for urid colors/latest +0ms
  mana:npm-registry requesting url http://registry.npmjs.org/colors/latest +4ms
  mana registered endpoint packages +0ms
  mana registered endpoint users +119ms
  mana updated potion.version to 0.1.5 +1ms
  mana updated potion.name to npm-registry +1ms
  licenses::parse searching for licensing information for colors +0ms
  licenses::parse attempting to extract the license information using: github +1ms
  mana:githulk adding an `all` callback for urid Marak/colors.js +0ms
  mana:githulk requesting url https://github.com/Marak/colors.js +3ms
  mana:githulk adding an `all` callback for urid repos/Marak/colors.js/contents/ +484ms
  mana:githulk requesting url https://api.github.com/repos/Marak/colors.js/contents/ +2ms
  licenses::github searching MIT-LICENSE.txt for license information +0ms
  mana:githulk adding an `all` callback for urid Marak/colors.js/master/MIT-LICENSE.txt +500ms
  mana:githulk requesting url https://raw.github.com/Marak/colors.js/master/MIT-LICENSE.txt +1ms
  licenses::parser had a 0% match for AFL 2.1 +0ms
  licenses::parser had a 0% match for AFL 3.0 +0ms
  licenses::parser had a 0.17953321364452424% match for AGPL 3.0 +2ms
  licenses::parser had a 0.1371742112482853% match for APL 1.0 +2ms
  licenses::parser had a 0% match for Apache 2.0 +0ms
  licenses::parser had a 0% match for Artistic 2.0 +0ms
  licenses::parser had a 2.631578947368421% match for BSD 2-Clause +0ms
  licenses::parser had a 2.272727272727273% match for BSD 3-Clause +1ms
  licenses::parser had a 0% match for BSD 4-Clouse +0ms
  licenses::parser had a 31.70731707317073% match for BSL 1.0 +0ms
  licenses::parser had a 0.2915451895043732% match for EPL 1.0 +0ms
  licenses::parser had a 0.33557046979865773% match for GPL 2.0 +1ms
  licenses::parser had a 0.08779631255487269% match for GPL 3.0 +1ms
  licenses::parser had a 21.73913043478261% match for ISC.txt +0ms
  licenses::parser had a 0.340522133938706% match for LGPL 2.1 +2ms
  licenses::parser had a 0% match for LGPL 3.0 +0ms
  licenses::parser had a 97.05882352941177% match for MIT +0ms
  licenses::parser had a 0.1314060446780552% match for MPL +1ms
  licenses::parser had a 0% match for MPL 2.0 +1ms
  licenses::parser had a 0.6756756756756757% match for Python 2.0 +0ms
  licenses::parser had a 32.5% match for UNLICENSE +0ms
  licenses::parser had a 0% match for WTFPL +0ms
  licenses::parser had a 0% match for Beerware +0ms
  licenses::parser had a 0% match for CDDL 1.0 +1ms
  licenses::parser had a 0.23696682464454977% match for NASA 1.3 +1ms
  licenses::parser had a 0% match for zlib/libpng +0ms
  licenses::content license file scan resulted in MIT as matching license +0ms
  licenses::parser normalized MIT to MIT using the "direct match" method +0ms
  licenses::github extracted MIT from MIT-LICENSE.txt +120ms
  licenses::parse parsing with github was successful +1s
  shrinkwrap successfully resolved colors@latest +0ms
  shrinkwrap package colors had no dependencies, nothing to shrinkwrap +1ms

3rd-Eden avatar Apr 01 '14 09:04 3rd-Eden

  mana:githulk adding an `all` callback for urid Marak/colors.js +314ms
  mana:githulk requesting url https://github.com/Marak/colors.js +2ms
  mana:githulk adding an `all` callback for urid repos/Marak/colors.js/contents/ +608ms
  mana:githulk requesting url https://api.github.com/repos/Marak/colors.js/contents/ +2ms
  mana:githulk Received an invalid statusCode (403) for URL https://api.github.com/repos/Marak/colors.js/contents/ +919ms
  mana:githulk Starting request again to https://api.github.com/repos/Marak/colors.js/contents/ after back off attempt 1/3 +2ms
  mana:githulk Received an invalid statusCode (403) for URL https://api.github.com/repos/Marak/colors.js/contents/ +921ms
  mana:githulk Starting request again to https://api.github.com/repos/Marak/colors.js/contents/ after back off attempt 2/3 +1ms
  mana:githulk Received an invalid statusCode (403) for URL https://api.github.com/repos/Marak/colors.js/contents/ +1s
  mana:githulk Starting request again to https://api.github.com/repos/Marak/colors.js/contents/ after back off attempt 3/3 +1ms
  mana:githulk Received an invalid statusCode (403) for URL https://api.github.com/repos/Marak/colors.js/contents/ +511ms
  mana:githulk Starting request again to https://api.github.com/repos/Marak/colors.js/contents/ after back off attempt 4/3 +0ms
  mana:githulk We failed to fetch https://api.github.com/repos/Marak/colors.js/contents/, all servers are down. +1ms
  shrinkwrap successfully resolved colors@latest +0ms
  shrinkwrap package colors had no dependencies, nothing to shrinkwrap +1ms

It looks like I indeed have a github issue.

Raynos avatar Apr 01 '14 09:04 Raynos

I should probably clarify it in the readme of licenses and licensing that you need to have a OAuth token if you're planning of checking a lot of modules. As unauthorized requests have a rate limit of 60 API calls per hour.

3rd-Eden avatar Apr 01 '14 09:04 3rd-Eden