pnpm list
Aliases: ls
このコマンドは、インストールされているパッケージのすべてのバージョンと依存関係を、ツリー構造で出力します。
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.
Options#
--recursive, -r#
サブディレクトリの全てのパッケージを対象に実行します。ワークスペース内で実行した場合は、ワークスペース内の全てのパッケージを対象に実行します。
--json#
ログを JSON 形式で出力します。
--long#
詳細情報を出力します。
--lockfile-only#
Added in: v10.23.0
Read package information from the lockfile instead of checking the actual node_modules directory. This is useful for quickly inspecting what would be installed without requiring a full installation.
--parseable#
ツリー形式ではなく、解析しやすい形式でパッケージのディレクトリ構造を出力します。
--global, -g#
現在のプロジェクトではなく、グローバルインストールディレクトリのパッケージを一覧表示します。
--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#
依存関係のうち、ワークスペース内のプロジェクトのみを表示します。
--exclude-peers#
Exclude peer dependencies from the results (but dependencies of peer dependencies are not ignored).
--filter <package_selector>#
--find-by <finder_name>#
Added in: v10.16.0
Use a finder function defined in .pnpmfile.cjs to match dependencies by properties other than name.