question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getLicense functions fails to handle some incorect licenses fields in package.json

See original GitHub issue

https://github.com/google/js-green-licenses/blob/e84fec11b5c55e3984798e1452c85caf830d521b/src/checker.ts#L192

This 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:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
JustinBeckwithcommented, Apr 5, 2021

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.

1reaction
kjincommented, Jun 26, 2019
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found