Uh oh!
There was an error while loading. Please reload this page.
chore!: remove npm shrinkwrap, use exact dependency versions - #1121
chore!: remove npm shrinkwrap, use exact dependency versions#1121Renegade334 wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## main #1121 +/- ##
=======================================
Coverage 63.27% 63.27% =======================================
Files 50 50 Lines 8342 8342 =======================================
Hits 5278 5278 Misses 3064 3064 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
aduh95
commented
Jul 21, 2026
That's not true, as you said after it only works for shallow deps. I'd rather just rename the file to |
Renegade334
commented
Jul 22, 2026
Any votes for |
aduh95
commented
Jul 22, 2026
Do we have some figures on how big of a bundle we're talking about? |
joyeecheung
commented
Jul 22, 2026
This wouldn't work for installing NCU globally, the idea is to pin the entire dependency tree when installing it globally (to prevent supply chain risks in transitive deps). |
Renegade334
commented
Jul 22, 2026
Looks like we would need to first upgrade c8 to eliminate the After doing so, npm is reporting a packed size of 120KiB for the conventional package, and 8MiB for the bundle, including 355 transitive dependencies. It won't make a difference for a first install, since all of those would need to be fetched anyway, but it will potentially make upgrades slightly slower (as the whole bundle will need to be fetched, even if dependencies aren't changing), and will impact upon npm dependency deduping, although this shouldn't matter too much for a global install. |
Since we just use node:test, maybe we can just use |
Renegade334
commented
Jul 28, 2026
I've merged #1123 as a path of least resistance, we can always revisit this. I'll put together a bundle-deps PR as an alternative, and we can take a verdict. |
Resolves#1078.
We are currently locking consumers' dependency versions by using npm-shrinkwrap.json, which causes npm to lock the dependency tree to the npm-shrinkwrap.json versions when resolving.
We can achieve a similar effect by de-ranging the dependency versions. We weren't actually allowing npm to "choose" a dependency within these semver ranges anyway, because npm-shrinkwrap.json existed.
This approach wouldn't guarantee strict versioning of dependencies-of-dependencies for packages which specify version ranges for their own deps. The alternative would be
bundleDependenciesto basically ship a pre-packed node_modules, which would also give some version control over transitive dependencies, at the expense of quite a bulky package.Either way, it'll be technically breaking because node-core-utils is now subject to external npm
overrides, which shrinkwrap disallowed.