Skip to content
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

licenses list same result for different directories #5689

Open
woifes opened this issue Nov 24, 2022 · 3 comments · May be fixed by #7847
Open

licenses list same result for different directories #5689

woifes opened this issue Nov 24, 2022 · 3 comments · May be fixed by #7847

Comments

@woifes
Copy link

woifes commented Nov 24, 2022

pnpm version: 7.17.0

Code to reproduce the issue:

Clone my monorepo for example: https://github.com/woifes/node-monorepo

git clone https://github.com/woifes/node-monorepo
cd node-monorepo
pnpm install 
pnpm licenses list | wc -l   //935
pnpm licenses list ./packages/binarytypes/ | wc -l   //935
cd ./packages/binarytypes
pnpm licenses list | wc -l   //935

Expected behavior:

Since "binarytypes" has only one dependency which has no dependency by itself, it should only be shown this one dependency.

Actual behavior:

The output is the same for every directory(package) of a monorepo. In this case I showed it by counting the lines. The license situation can not be determined for the single packages inside a monorepo.

Additional information:

  • node -v prints: 18.0.0
  • Windows, macOS, or Linux?: Windows
@weyert
Copy link
Contributor

weyert commented Nov 25, 2022

Currently it lists the licenses for all dependencies in the PNPM-based project. Currently it is not possible to only get a list of licenses for a specific workspace in the project. This would be a feature enhancement

@RobbieTheWagner
Copy link

@weyert I am surprised it works in workspaces at all for you. I get this error  ERR_PNPM_UNSUPPORTED_PACKAGE_TYPE  Unsupported package resolution type for file:lib/art19-ad-rep_y3vhx3zpzli5z6ifkqpr2p764a

@woifes
Copy link
Author

woifes commented Dec 12, 2023

@weyert I just now published my package which implements my idea of a license report. It works in packages of monorepos too. It utilizes the pnpm list command to create the dependency tree.
Try it out if you like: license-report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants