pnpm list

Aliases: ls

Este comando irá exibir todas as versões dos pacotes que estão instalados, bem como suas dependências, em uma estrutura de árvore.

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.

Opções#

--recursive, -r#

Execute o comando em cada pacote em subdiretórios ou em cada pacote do workspace, quando executado dentro de um workspace.

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#

Exibe o log de saída no formato JSON. The unsavedDependencies field lists packages present in the project's own modules directory that its lockfile entry does not record.

--long#

Exibir informações extendidas. 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#

Exibe os diretórios de pacotes em um formato parseable em vez de sua visualização de árvore.

--global, -g#

Liste os pacotes no diretório de instalação global em vez de no projeto atual.

--depth <number>#

A profundidade máxima da árvore de dependência.

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#

Exiba apenas dependências que também sejam projetos dentro do workspace.

--exclude-peers#

Exclude peer dependencies from the results (but dependencies of peer dependencies are not ignored).

--filter <package_selector>#

Read more about filtering.

--find-by <finder_name>#

Use a finder function defined in .pnpmfile.mjs to match dependencies by properties other than name.