-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: dont omit license from stored manifests #7475
Conversation
This has the effect of adding licenses back into the lockfiles. Based on code in shrinkwrap.js and inventory.js, it appears that lockfiles are supposed to store the license. It's likely that in practice this behavior has not been consistent due to fetching of minifed manifests and packuments. I also attempted to remove the license code from shrinkwrap but that caused many more tests to break. Plus I believe this is the intended behavior, to have licenses in lockfiles based on bug reports like #7384
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is great; having the license more available will make license-checking tools faster and more reliable.
Result of `make update-js`. Tested all dependencies. Lockfile diff is because of npm/cli#7475.
Hi, thanks for the hard work on npm. Thanks in advance |
The reason the integrity and resolved are missing is a known bug and has to do w/ the fact that it is populating from |
Thanks for your quick reply ! Did I understand correctly that the easiest way to add the licenses without changing anything else is to use an npm version with #6301 fixed and do Do you know which version of npm it should be ? Is there a version already that has the licenses fix and doesn't have this bug ? In the meantime a workaround is to do it manually of course. Thanks in advance |
Result of `make update-js`. Tested all dependencies. Lockfile diff is because of npm/cli#7475.
This has the effect of adding licenses back into the lockfiles.
Based on code in shrinkwrap.js and inventory.js, it appears that
lockfiles are supposed to store the license. It's likely that in
practice this behavior has not been consistent due to fetching
of minifed manifests and packuments.
I also attempted to remove the license code from shrinkwrap but
that caused many more tests to break. Plus I believe this is the
intended behavior, to have licenses in lockfiles based on bug
reports like #7384