Aller au contenu principal
Version: 10.x

Comparaison des fonctionnalités

Fonctionnalité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 Node.js versions✅❌❌
Managing versions of itself✅✅❌
Possède un lockfile✅✅✅pnpm-lock.yaml, yarn.lock, package-lock.json.
Overrides support✅✅✅Known as "resolutions" in Yarn.
Mémoire d'adressage globale✅✅❌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✅✅❌
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.