Improve license resolution
Opened this issue ยท 2 comments
Hey, ๐
License is not always shown, even if it's specified. Example:
https://nicedoc.io/substack/stream-handbook
https://github.com/substack/stream-handbook/blob/master/LICENSE
It would be also great to see a license if it's specified in package.json
file (example) or even in readme (example).
Hey,
I agree with you but I'm not sure how to do that in a generic way.
Think this repository is oriented for any repository, not only npm packages!
Currently, the license is obtained from SPDX coming from GitHub API:
nicedoc.io/core/github/fetch-meta.js
Line 23 in 83c23fb
I did not find how GitHub determined it, but I feel that, if the field is missing, then the repository does not have enough information to determine it.
So my point is probably a better solution is to warn about that, more oriented to give users insights about missings things and how to fix them (see #67).
Yep, I saw that issue.
However, there are so many packages which don't use license
file. In most of my packages there is a license info in package.json
and in readme, but they will be considered as non-license and give a warning in this case (I kinda dislike creating separate useless file for license when it's already mentioned in 2 places) ๐ค