kessler / license-report

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

Version number from package.json missing in output #24

Closed BePo65 closed 3 years ago

BePo65 commented 4 years ago

The output of license-report lists the most recent version number from the repository.

From my point of view the report would be even more valuable, if it would also contain the version number from the package.json.

The information is available in getPackageReportData.js, so that wouldn't be too difficult. How about 'installedVersion' as field name?

jthegedus commented 3 years ago

are you not able to get that from your own package.json?

[EDIT]: it is available in the comment field

BePo65 commented 3 years ago

ups - how come i missed that field :-)

[EDIT]: would have been better if I looked more intensively on the results of my quick test of the results: the field comment contains the latest version on the remote repository which is the same as the version installed in your project if your project uses the latest version (and only then).

So this issue is still an issue (at least in my opinion :-)

jthegedus commented 3 years ago

latest version on the remote repository which is the same as the version installed in your project if your project uses the latest version

Ah! I agree that is an issue :+1:

kessler commented 3 years ago

Shall we change the comment fieldname to remoteVersion or something of the sorts?

jthegedus commented 3 years ago

I think the desire here is to fetch the license details for the local version as that's what is used to build the application (and include the local version # in the output json)

BePo65 commented 3 years ago

I think remoteVersion would be a fine name, but this will break all applications using the fieldname comment. But in my opinion the new name would make clearer what this field is about (kinda 'clean code' :-).

kessler commented 3 years ago

We can just add remoteVersion for starters and then at some point, remove comment from the default displayed fields. what do you think?

Also on a completely separate subject, would you like to become a permament contributor to this project? if so, let me know via yaniv at ironsrc dot com and we'll coordinate a quick meeting.