Перейти к основному содержимому
Версия: Будущая

Сравнение возможностей

ВозможностьpnpmYarnnpmNotes
Поддержка воркспейсов
Изолированная node_modulesDefault in pnpm.
Не иерархичность node_modulesDefault in npm.
Plug'n'PlayDefault in Yarn.
Авто-установка peerDependencies
Zero-Installs
Патчинг зависимостей
Managing runtimes
Managing versions of itself
Имеет lock-файл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.
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.
Хуки
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.