getLicense functions fails to handle some incorect licenses fields in package.json
See original GitHub issueThis function will return "()"
for both
...
licenses: [ ],
...
and
...
licenses: [ "MIT", "BSD" ],
...
I think it should return null
for the first case and "( MIT OR BSD )"
for the other.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Unable to parse license field for certain npm dependencies
What happened: grype analysis shoes parsing problems for certain package.json files with syft 0.5.1, specifically, the license fields.
Read more >node.js - What should I put in the license field of package.json ...
Use UNLICENSED per the npm docs: Finally, if you do not wish to grant others the right to use a private or unpublished...
Read more >package.json - npm Docs
Some old packages used license objects or a "licenses" property containing an array ... At the root of your package it will not...
Read more >Update license API | Elasticsearch Guide [8.5] | Elastic
If Elasticsearch security features are enabled, you need manage cluster ... If the license you are installing does not support all of the...
Read more >Mobile Device Management Protocol Reference
Only one MDM payload can be installed on a device at any given time. ... server-side data or to recover from a failure...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The empty array part was addressed in #146, and from reading the thread - I think we’re going to keep the stricter package json parsing as is.
Never mind, you’re right: https://www.npmjs.com/package/kjin-license-test