@@ -5,30 +5,41 @@ title: Feature Comparison
5
5
6
6
| Feature | pnpm | Yarn | npm | Notes |
7
7
| --- | :--: | :--: | :--: | --- |
8
- | Workspace support | :white_check_mark : | :white_check_mark : | :white_check_mark : |
8
+ | [ Workspace support] | :white_check_mark : | :white_check_mark : | :white_check_mark : |
9
9
| Isolated ` node_modules ` | :white_check_mark : | :white_check_mark : | :white_check_mark : | Default in pnpm. |
10
- | Hoisted ` node_modules ` | :white_check_mark : | :white_check_mark : | :white_check_mark : | Default in npm. |
10
+ | [ Hoisted ` node_modules ` ] | :white_check_mark : | :white_check_mark : | :white_check_mark : | Default in npm. |
11
11
| Plug'n'Play | :white_check_mark : | :white_check_mark : | :x : | Default in Yarn. |
12
- | Autoinstalling peers | :white_check_mark : | :x : | :white_check_mark : |
12
+ | [ Autoinstalling peers] | :white_check_mark : | :x : | :white_check_mark : |
13
13
| Zero-Installs | :x : | :white_check_mark : | :x : |
14
- | Patching dependencies | :white_check_mark : | :white_check_mark : | :x : |
15
- | Managing Node.js versions | :white_check_mark : | :x : | :x : |
16
- | Managing versions of itself | :white_check_mark : | :white_check_mark : | :x : |
14
+ | [ Patching dependencies] | :white_check_mark : | :white_check_mark : | :x : |
15
+ | [ Managing Node.js versions] | :white_check_mark : | :x : | :x : |
16
+ | [ Managing versions of itself] | :white_check_mark : | :white_check_mark : | :x : |
17
17
| Has a lockfile | :white_check_mark : | :white_check_mark : | :white_check_mark : | ` pnpm-lock.yaml ` , ` yarn.lock ` , ` package-lock.json ` . |
18
- | Overrides support | :white_check_mark : | :white_check_mark : | :white_check_mark : | Known as "resolutions" in Yarn. |
18
+ | [ Overrides support] | :white_check_mark : | :white_check_mark : | :white_check_mark : | Known as "resolutions" in Yarn. |
19
19
| Content-addressable storage | :white_check_mark : | :white_check_mark : | :x : | Yarn uses a CAS when ` nodeLinker ` is set to ` pnpm ` . |
20
- | Dynamic package execution | :white_check_mark : | :white_check_mark : | :white_check_mark : | ` pnpm dlx ` , ` yarn dlx ` , ` npx ` . |
21
- | Side-effects cache | :white_check_mark : | :x : | :x : |
20
+ | [ Dynamic package execution] | :white_check_mark : | :white_check_mark : | :white_check_mark : | ` pnpm dlx ` , ` yarn dlx ` , ` npx ` . |
21
+ | [ Side-effects cache] | :white_check_mark : | :x : | :x : |
22
22
| [ Catalogs] | :white_check_mark : | :x : | :x : |
23
23
| [ Config dependencies] | :white_check_mark : | :x : | :x : |
24
24
| [ JSR registry support] | :white_check_mark : | :white_check_mark : | :x : |
25
25
| [ Auto-install before script run] | :white_check_mark : | :x : | :x : | In Yarn, Plug'n'Play ensures dependencies are always up to date. |
26
26
| [ Hooks] | :white_check_mark : | :white_check_mark : | :x : |
27
- | Listing licenses | :white_check_mark : | :white_check_mark : | :x : | pnpm supports it via ` pnpm licenses list ` . Yarn has a plugin for it. |
27
+ | [ Listing licenses] | :white_check_mark : | :white_check_mark : | :x : | pnpm supports it via ` pnpm licenses list ` . Yarn has a plugin for it. |
28
28
29
+ [ Auto-install before script run ] : ./settings.md#verifydepsbeforerun
30
+ [ Autoinstalling peers ] : ./settings.md#autoinstallpeers
29
31
[ Catalogs ] : ./catalogs.md
30
32
[ Config dependencies ] : ./config-dependencies.md
33
+ [ Dynamic package execution ] : ./cli/dlx.md
34
+ [ Hoisted `node_modules` ] : ./settings.md#nodelinker
31
35
[ JSR registry support ] : ./cli/add.md#install-from-the-jsr-registry
32
- [ Auto-install before script run ] : ./settings.md#verifydepsbeforerun
36
+ [ Listing licenses ] : ./cli/licenses.md
37
+ [ Managing Node.js versions ] : ./cli/env.md
38
+ [ Managing versions of itself ] : ./settings.md#managepackagemanagerversions
39
+ [ Overrides support ] : ./settings.md#overrides
40
+ [ Patching dependencies ] : ./cli/patch.md
41
+ [ Side-effects cache ] : ./settings.md#sideeffectscache
42
+ [ Workspace support ] : ./workspaces.md
33
43
[ hooks ] : ./pnpmfile.md
34
44
45
+ ** Note:** To keep the comparison concise, we include only features likely to be used frequently.
0 commit comments