-
-
Notifications
You must be signed in to change notification settings - Fork 941
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(licenses): list licenses specific to workspace member package #7847
base: main
Are you sure you want to change the base?
Conversation
I will have a look. I would think you would only need to filter by |
It wouldn't work if the workspace package had another workspace package as dependency. When building dependency tree from lockfile, It might also seem like you could get the list of That's why I thought I had to modify |
Ah interesting, yeah, think this would be one for @zkochan :) What you are saying makes sense, though. Only not sure if the |
It might be possible to use existing filtering for this. We already have filtering that finds the workspace projects that are dependencies of a project, when the |
This creates an issue where
Should I modify |
The new commit changes lockfile walker so that it can be used to follow links. Because |
The change looks a bit complicated. Let's work on it after a stable version of v9 is out. |
121322b
to
482ffff
Compare
482ffff
to
39f6f9f
Compare
Closes #5689
Before this PR,
pnpm licenses list
could not be run for individual workspace packages. Even when it was run inside a workspace member package, the licenses of the entire workspace dependencies were listed.After this PR, when
pnpm licenses list
is executed inside a workspace member package, only the licenses of that specific package dependencies will be listed.For example, with a workspace dependency tree as following:
cd package1; pnpm licenses list
will outputdep1, dep2, dev1 (dev)
cd package2; pnpm licenses list
will outputdep2, dev2 (dev)
.You can still run
pnpm -w licenses list
to get previous behavior. Also, filter rules arguments (e.g.--filter
) take precedent.