Skip to content

chore!: remove npm shrinkwrap, use exact dependency versions#1121

Open
Renegade334 wants to merge 2 commits into
nodejs:mainfrom
Renegade334:npm-exact-deps
Open

chore!: remove npm shrinkwrap, use exact dependency versions#1121
Renegade334 wants to merge 2 commits into
nodejs:mainfrom
Renegade334:npm-exact-deps

Conversation

@Renegade334

@Renegade334 Renegade334 commented Jul 21, 2026

Copy link
Copy Markdown
Member

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 bundleDependencies to 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.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.27%. Comparing base (78e1dbb) to head (9030665).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aduh95

aduh95 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

We can achieve a similar effect by de-ranging the dependency versions.

That's not true, as you said after it only works for shallow deps. I'd rather just rename the file to package-lock.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

npm shrink wrap is deprecated

2 participants