pnpm list
Aliases: ls
此命令会以一个树形结构输出所有的已安装 package 的版本及其依赖。
Positional arguments are name-pattern@version-range identifiers, which will
limit the results to only the packages named. For example,
pnpm list "babel-*" "eslint-*" semver@5.
配置项
--recursive, -r
执行该命令于子目录所有 package 中,或者如果执行在一个工作空间时,在工作空间的所有 package 执行。
--json
JSON 格式的日志输出。
--long
显示扩展信息。
--parseable
以可解析的格式输出 package 目录而不是它们的树结构视图。
--global, -g
列出在全局安装目录的 package ,而不是在当前项目中。
--depth <number>
依赖项的树的最大显示深度。
pnpm ls --depth 0 (default) will list direct dependencies only.
pnpm ls --depth -1 will list projects only. Useful inside a workspace when
used with the -r option.
pnpm ls --depth Infinity will list all dependencies regardless of depth.
--prod, -P
Display only the dependency graph for packages in dependencies and
optionalDependencies.
--dev, -D
Display only the dependency graph for packages in devDependencies.
--no-optional
Don't display packages from optionalDependencies.
--only-projects
仅显示同时也在工作区内的依赖项。