kessler / license-report

create a short report about a project's dependencies (license, url etc)
MIT License
236 stars 39 forks source link

Display both "repository URL" and "homepage URL" #18

Closed morficus closed 4 years ago

morficus commented 5 years ago

By default this package will report the repository URL for dependencies.

It would be nice to also display the homepage URL if one is present.

kessler commented 5 years ago

@morficus not sure if the homepage adds or detracts from a license report's value. I can see why it might be useful, but it also can cause more clutter.

Maybe other people can express their opinion about this feature request. For now I'm not going to implement but leave the issue opened.

BePo65 commented 4 years ago

Having more fields in the output would be nice for shure (see also my issue #24).

But I think we should avoid "information overload"; having more and more fields in the (default) output will make users happy (because they get the information they need for their application) and unhappy at the same time (because of all the fields in the output they don't need).

How about:

This way we get backward compatibility (if the user doesn't use the fields option on the command line) and a customizable output.

I've tried out setting the fields option with: node index.js --output=csv --fields=name --fields=licenseType --fields=link --fields=comment

and as expected I get: async,MIT,git+https://github.com/caolan/async.git,0.9.2 debug,MIT,git://github.com/visionmedia/debug.git,3.2.6 lodash,MIT,git+https://github.com/lodash/lodash.git,4.17.15 rc,(BSD-2-Clause OR MIT OR Apache-2.0),git+https://github.com/dominictarr/rc.git,1.2.8 request,Apache-2.0,git+https://github.com/request/request.git,2.88.2 semver,ISC,git+https://github.com/npm/node-semver.git,5.7.1 stubborn,ISC,git://github.com/grudzinski/stubborn.git,1.2.5 text-table,MIT,git://github.com/substack/text-table.git,0.2.0 visit-values,MIT,https://github.com/kessler/node-visit-values,1.0.4 @kessler/exponential-backoff,MIT,https://registry.npmjs.org/@kessler/exponential-backoff/-/exponential-backoff-2.0.1.tgz,2.0.1

morficus commented 4 years ago

@BePo65 I ended up having to roll my own solution and it does the behavior you described above.

phobetron commented 4 years ago

The NPM registry URL would be nice to have as well, as an optional field!