@@ -3,24 +3,31 @@ id: feature-comparison
3
3
title : Feature Comparison
4
4
---
5
5
6
- | Feature | pnpm | Yarn | npm |
7
- | --- | --- | --- | --- |
8
- | Workspace support | ✔️ | ✔️ | ✔️ |
9
- | Isolated ` node_modules ` | ✔️ - The default | ✔️ | ✔️ |
10
- | Hoisted ` node_modules ` | ✔️ | ✔️ | ✔️ - The default |
11
- | Autoinstalling peers | ✔️ | ❌ | ✔️ |
12
- | Plug'n'Play | ✔️ | ✔️ - The default | ❌ |
13
- | Zero-Installs | ❌ | ✔️ | ❌ |
14
- | Patching dependencies | ✔️ | ✔️ | ❌ |
15
- | Managing Node.js versions | ✔️ | ❌ | ❌ |
16
- | Has a lockfile | ✔️ - ` pnpm-lock.yaml ` | ✔️ - ` yarn.lock ` | ✔️ - ` package-lock.json ` |
17
- | Overrides support | ✔️ | ✔️ - Via resolutions | ✔️ |
18
- | Content-addressable storage | ✔️ | ❌ | ❌ |
19
- | Dynamic package execution | ✔️ - Via ` pnpm dlx ` | ✔️ - Via ` yarn dlx ` | ✔️ - Via ` npx ` |
20
- | Side-effects cache | ✔️ | ❌ | ❌ |
21
- | [ Catalogs] | ✔️ | ❌ | ❌ |
22
- | [ Config dependencies] | ✔️ | ❌ | ❌ |
23
- | Listing licenses | ✔️ - Via ` pnpm licenses list ` | ✔️ - Via a plugin | ❌ |
6
+ | Feature | pnpm| Yarn| npm | Notes |
7
+ | --- | :--:| :--:| :--:| --- |
8
+ | Workspace support | ✔️ | ✔️ | ✔️ |
9
+ | Isolated ` node_modules ` | ✔️ | ✔️ | ✔️ | For pnpm this is the default one |
10
+ | Hoisted ` node_modules ` | ✔️ | ✔️ | ✔️ | For npm this is the default one |
11
+ | Autoinstalling peers | ✔️ | ✔️ | ✔️ |
12
+ | Plug'n'Play | ✔️ | ✔️ | ❌| For Yarn this is the default one |
13
+ | Zero-Installs | ❌| ✔️ | ❌|
14
+ | Patching dependencies | ✔️ | ✔️ | ❌|
15
+ | Managing Node.js versions | ✔️ | ❌| ❌|
16
+ | Managing versions of itself | ✔️ | ✔️ | ❌|
17
+ | Has a lockfile | ✔️ | ✔️ | ✔️ | ` pnpm-lock.yaml ` , ` yarn.lock ` , ` package-lock.json ` |
18
+ | Overrides support | ✔️ | ✔️ | ✔️ | Yarn calls this feature "resolutions" |
19
+ | Content-addressable storage | ✔️ | ❌| ❌|
20
+ | Dynamic package execution | ✔️ | ✔️ | ✔️ | ` pnpm dlx ` , ` yarn dlx ` , ` npx ` |
21
+ | Side-effects cache | ✔️ | ❌| ❌|
22
+ | [ Catalogs] | ✔️ | ❌| ❌|
23
+ | [ Config dependencies] | ✔️ | ❌| ❌|
24
+ | [ JSR registry support] | ✔️ | ✔️ | ❌|
25
+ | [ Running install automatically before runnings scripts] | ✔️ | ❌| ❌| In case of Yarn, if Plug'n'Play is used, dependencies are always up-to-date |
26
+ | [ Hooks] | ✔️ | ✔️ | ❌|
27
+ | Listing licenses | ✔️ | ✔️ | ❌| pnpm supports it via ` pnpm licenses list ` . Yarn has a plugin for it. |
24
28
25
29
[ Catalogs ] : ./catalogs.md
26
30
[ Config dependencies ] : ./config-dependencies.md
31
+ [ JSR registry support ] : ./cli/add.md#install-from-the-jsr-registry
32
+ [ Running install automatically before runnings scripts ] : ./settings.md#verifydepsbeforerun
33
+ [ hooks ] : ./pnpmfile.md
0 commit comments