pnpm ls only lists top-level dependencies by default but it should list all subdependencies as well
#11162
starkipraggy
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
Check pnpm-why, I think it's closer to |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Posting here as I am also looking for help to raise an issue. Is this a feature request or a bug?
The docs say (emphasis mine):
But it doesn't actually do that unless you specify
--depth=Infinity.I use
pnpm lslikenpm lsexpecting that the command will list all subdependencies. This is especially important in situations where you are looking for whether you have a specific package in your subdependencies for security checks. (pnpm auditisn't updated fast enough for situations like the current axios debacle)I understand that bigger repositories might have performance problems with having all dependencies recursively listed by default.
My stance is the big repository usecase should be the one where you have to specify
--depthbecause it's different for everyone.The failure case for performance problems is to simply
Ctrl-Cor at the very worst, turn the machine on and off again.The failure case for not showing subdependencies when they're trusted to be shown is a security breach.
pnpm lsshould bepnpm ls --depth=Infinityby default.All reactions