본문으로 건너뛰기
버전: 11.x

기능 비교

기능pnpmYarnnpmNotes
Workspace support✅✅✅
Isolated node_modules✅✅✅Default in pnpm.
Hoisted node_modules✅✅✅Default in npm.
Plug'n'Play✅✅❌Default in Yarn.
Autoinstalling peers✅❌✅
Zero-Installs❌✅❌
Patching dependencies✅✅❌
Managing runtimes✅❌❌
Managing versions of itself✅✅❌
lockfile 보유✅✅✅pnpm-lock.yaml, yarn.lock, package-lock.json.
Overrides support✅✅✅Known as "resolutions" in Yarn.
Content-addressable 저장소✅✅❌Yarn uses a CAS when nodeLinker is set to pnpm.
Dynamic package execution✅✅✅pnpm dlx, yarn dlx, npx.
Side-effects cache✅❌❌
Catalogs✅❌❌
Config dependencies✅❌❌
JSR registry support✅✅❌
Auto-install before script run✅❌❌In Yarn, Plug'n'Play ensures dependencies are always up to date.
Hooks✅✅❌
Build script security✅❌❌
SBOM generation✅❌✅pnpm sbom, npm sbom.
Listing licenses✅✅❌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.