Do you want to request a feature or report a bug?
Documentation bug
What is the current behavior?
https://yarnpkg.com/en/docs/cli/licenses#toc-yarn-licenses-generate-disclaimer shows in the description:
Running this command will return a sorted list of licenses from all the packages you have installed to the stdout
If the current behavior is a bug, please provide the steps to reproduce.
Go to https://yarnpkg.com/en/docs/cli/licenses#toc-yarn-licenses-generate-disclaimer and read the description of the command.
What is the expected behavior?
It should read something like: It outputs license template to stdout
or similar.
Please mention your node.js, yarn and operating system version.
Irrelevant
Hi @Narven and @bestander! I would like to help on that, looks quick to fix. Yet I cannot understand where the documentation is falsy.
When running yarn licenses generate disclaimer
it effectively outputs on stdout the list of all package licenses and the documentation says so.
Is the expected behaviour in your Issue is to group deps by licences OR just changing the wording of the documentation? (Although it looks like it says what it does).
Have a nice week-end!
@nbarray, thanks for stepping in
@nicobarray, @narven, I'm not sure if this is what the original reporter had in mind, but the inaccuracy is the phrase "packages you have installed" (and a similar inaccuracy for the documentation of yarn licenses list
, which says "packages that were installed by yarn
or yarn install
").
The problem is that if I do yarn install --prod
, a subsequent yarn licenses list
or yarn licenses generate-disclaimer
includes _all_ dependencies including dev-dependencies — so not the ones that were just installed. If I want to list just the production dependencies I can use the command yarn --prod true licenses list
.
I don't think there is anything wrong with the current behaviour, but it is definitely independent of the modules that have actually been installed in node_modules
.
Hey @nicobarray @Narven, I tested this feature on yarn as well but It still just exports all dependencies, not prod only.
yarn: 1.19.2
node: 12.12.0
macOSX
is there any way to get prod only packages for creating a license file? or @tibbes did you find another solution for this?
It was also related to this issue