pnpm list
Aliases: ls
Perintah ini akan menampilkan semua versi paket yang diinstal, serta serta dependensinya, dalam struktur pohon.
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.
Pengaturan#
--recursive, -r#
Jalankan perintah pada setiap paket di subdirektori atau pada setiap paket di workspace, ketika dijalankan di dalam workspace.
--json#
Output log dalam format JSON.
--long#
Tampilkan informasi tambahan.
--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#
Menghasilkan direktori paket dalam format yang dapat diuraikan, bukan dalam tampilan hierarki.
--global, -g#
Buat daftar paket di direktori instal global alih-alih di proyek saat ini.
--depth <number>#
Kedalaman maksimum hirarki depedensi yang di tampilkan.
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#
Hanya menampilkan dependensi yang juga merupakan proyek dalam workspace.
--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.