Commit 0f444ae
feat!: stop including
#### Summary
Per https://docs.npmjs.com/cli/v11/configuring-npm/npm-shrinkwrap-json,
one of the intended use cases for `npm-shrinkwrap.json` is
> command-line tools intended as global installs or devDependencies
[For several years](#2223), this is
what we've done with Netlify CLI.
This has come with... some pushback:
#6731. Including from the creator
of NPM.
On one hand, ensuring dependencies are pinned makes installs
deterministic and *helps* with security by preventing certain classes of
supply chain vulnerabilities.
On the other hand, when vulnerabilities are disclosed and patched,
Netlify CLI users cannot benefit from those patches until Netlify CLI
maintainers specifically bump them and publish a new release. Users
can't even `npm audit fix`.
Also, pnpm, yarn, bun, and all package managers other than npm do not
respect `npm-shrinkwrap.json` anyway.
It also honestly adds some maintenance complexity for us. We have some
strange scripts needed to make this work, for example to exclude our own
dev dependencies from the file. We've encountered [some strange
shrinkwrap-specific bugs](#7769).
And reacting quickly to all the incoming CVEs is disruptive.
Also, in some cases users may lose out on potential dependency deduping
in their tree (and global caching on their machine, with some package
managers).
**✅ Verdict: remove it.**
Closes #6731
Co-authored-by: Eduardo Bouças <mail@eduardoboucas.com>npm-shrinkwrap.json (#8163)1 parent 28c958f commit 0f444ae
3 files changed
+2
-57
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
56 | 54 | | |
57 | 55 | | |
58 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 2 | + | |
| 3 | + | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 35 | | |
47 | 36 | | |
48 | 37 | | |
49 | 38 | | |
50 | 39 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 40 | | |
60 | 41 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 42 | | |
67 | 43 | | |
68 | 44 | | |
This file was deleted.
0 commit comments