pnpm-list
List installed packages in a symlinked `node_modules`
Install
Install it via npm.
npm install pnpm-list
Usage
'use strict'const pnpmList = default
API
list(path, [opts]): Promise<string>
default: Returns a string output similar to the npm ls
but for pnpm.
Arguments
path
- String - path to the project[opts.depth]
- number -0
by default. Max display depth of the dependency tree.[opts.only]
- dev | prod -null
by default. Display only the dependency tree for packages indevDependencies
ordependencies
.[opts.long]
- Boolean -false
by default. If true, show extended information.[opts.parseable]
- Boolean -false
by default. Show parseable output instead of tree view.[opts.alwaysPrintRootPackage]
- Boolean -true
by default. Print the root package even if no dependencies found/matched.
forPackages(packages, path, [opts]): Promise<string>
Returns a string output similar to the npm ls [<@scope>/]<pkg> ...
but for pnpm.
Arguments
packages
- String[] - an array ofname@version-range
identifiers, which will limit the results to only the paths to the packages named.path
- String - path to the project[opts.depth]
- number -0
by default. Max display depth of the dependency tree.[opts.only]
- dev | prod -null
by default. Display only the dependency tree for packages indevDependencies
ordependencies
.[opts.long]
- Boolean -false
by default. If true, show extended information.[opts.parseable]
- Boolean -false
by default. Show parseable output instead of tree view.[opts.alwaysPrintRootPackage]
- Boolean -true
by default. Print the root package even if no dependencies found/matched..