Pular para o conteúdo principal
Versão: 11.x

Comparação de Recursos

RecursopnpmYarnnpmNotes
Workspace support
Isolated node_modulesDefault in pnpm.
Hoisted node_modulesDefault in npm.
Plug'n'PlayDefault in Yarn.
Autoinstalling peers
Instalações zero
Patching dependencies
Managing runtimes
Managing versions of itself
Possui um arquivo lockpnpm-lock.yaml, yarn.lock, package-lock.json.
Overrides supportKnown as "resolutions" in Yarn.
Armazenamento de conteúdo endereçávelYarn uses a CAS when nodeLinker is set to pnpm.
Dynamic package executionpnpm dlx, yarn dlx, npx.
Side-effects cache
Catalogs
Config dependencies
JSR registry support
Auto-install before script runIn Yarn, Plug'n'Play ensures dependencies are always up to date.
Hooks
Build script security
SBOM generationpnpm sbom, npm sbom.
Listing licensespnpm supports it via pnpm licenses list. Yarn has a plugin for it.

Note: To keep the comparison concise, we include only features likely to be used frequently.