mhassan1 / yarn-plugin-licenses

Yarn Berry plugin that adds `yarn licenses` commands
42 stars 11 forks source link

Feature request: --production browser licenses #22

Closed raDiesle closed 2 years ago

raDiesle commented 2 years ago

would be nice to have included only browser licenses like its done by https://www.npmjs.com/package/@cyclonedx/bom

Actually cyclone also has no specific flag - seems like --production works different compared to the yarn-plugin-licenses.

As per law, browser shipped dependencies must be generated.

mhassan1 commented 2 years ago

Thanks for the feature request!

What are browser licenses? Do you have an example of a package.json and what you would expect for the output of yarn licenses?

raDiesle commented 2 years ago

My setup is a web application based on Create-React-App. By law, you must provide licenses for libraries used in the browser, not the ones used in the server or for the build.

So this is what i mean by "browser licenses".

I am not sure how exactly they do it but cyclonedx ( but they dont have support for pnp, yet) gives me the licenses I need, in comparison yarn-plugin-licenses gives me too many licenses, maybe devDependencies as well.

mhassan1 commented 2 years ago

How is the desired result different from yarn licenses --production?

raDiesle commented 2 years ago

I can explain the situation better now:

yarn licenses list --production shows like a good set of licenses

where

yarn licenses generate-disclaimer --prod is not supported yet

Can we add support for prod on generate-disclaimer as well?

mhassan1 commented 2 years ago

yarn licenses generate-disclaimer --production is already supported. Please try it.

raDiesle commented 2 years ago

your right I did diff.... weird. wrong statement from me. I will then compare and figure out. Thanks for quick reply