メインコンテンツまでスキップ
Version: Next

機能の比較

機能pnpmYarnnpmNotes
ワークスペースのサポート
分離されたnode_modulesDefault in pnpm.
ホイストされた node_modulesDefault in npm.
Plug'n'PlayDefault in Yarn.
Peerの自動インストール
Zero-Installs
依存関係のパッチ
Managing runtimes
Managing versions of itself
ロックファイルpnpm-lock.yaml, yarn.lock, package-lock.json.
オーバーライドのサポートKnown as "resolutions" in Yarn.
連想ストレージYarn uses a CAS when nodeLinker is set to pnpm.
パッケージの直接実行pnpm dlx, yarn dlx, npx.
副作用キャッシュ
Catalogs
Config dependencies
JSR registry support
Auto-install before script runIn Yarn, Plug'n'Play ensures dependencies are always up to date.
フック
Build script security
SBOM generationpnpm sbom, npm sbom.
ライセンスの一覧表示pnpm 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.