pnpm list
Aliases: ls
Questo comando produrrà tutte le versioni dei pacchetti che sono installati e le loro dipendenze, in una struttura ad albero.
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.
Since v12.7.0, running pnpm list inside a workspace project lists only that
project. Use --recursive or --filter
to list other workspace projects.
Opzioni#
--recursive, -r#
Esegui il comando in ogni pacchetto in sottocartelle o in ogni pacchetto dello spazio di lavoro, quando eseguito all'interno di uno spazio di lavoro.
Workspace projects are listed in dependency order: a project appears after the
workspace projects it depends on. Pass --no-sort to
keep workspace order, or --reverse to list
dependents first. Combine --no-sort with --reverse to list projects in reverse workspace order.
--json#
Registra l'output in formato JSON. The unsavedDependencies field lists packages
present in the project's own modules directory that its lockfile entry does
not record.
--long#
Mostra informazioni aggiuntive. pnpm ll and pnpm la are shorthands for pnpm list --long.
--lockfile-only#
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.
With --find-by, finder callbacks can read manifests from the configured store
even when node_modules is absent. Run pnpm fetch first if the packages have
not been downloaded.
--parseable#
Produce cartelle di pacchetti in un formato analizzabile invece della loro vista ad albero.
--global, -g#
Elenca i pacchetti nella cartella di installazione globale invece che nel progetto corrente.
--depth <number>#
Profondità di visualizzazione massima dell'albero delle dipendenze.
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.
--optional#
Include packages from optionalDependencies.
--only-projects#
Visualizza solo le dipendenze che sono anche progetti all'interno dell'area di lavoro.
--exclude-peers#
Exclude peer dependencies from the results (but dependencies of peer dependencies are not ignored).
--filter <package_selector>#
--find-by <finder_name>#
Use a finder function defined in .pnpmfile.mjs to match dependencies by properties other than name.