Skip to content

fix: rename npm-shrinkwrap.json to package-lock.json - #1129

Open
MikeMcC399 wants to merge 1 commit into
nodejs:mainfrom
MikeMcC399:convert-to-package-lock
Open

fix: rename npm-shrinkwrap.json to package-lock.json#1129
MikeMcC399 wants to merge 1 commit into
nodejs:mainfrom
MikeMcC399:convert-to-package-lock

Conversation

@MikeMcC399

Copy link
Copy Markdown
Contributor

Situation

npm 12 drops npm-shrinkwrap.json used in this repo as a published lockfile.

The npm 12.0.0 changelog states:

npm shrinkwrap is removed, the shrinkwrap config alias is removed, and npm-shrinkwrap.json is no longer loaded or honored at the project root or from inside dependency tarballs. Rename project-root npm-shrinkwrap.json to package-lock.json; use bundleDependencies if you need to ship a locked dependency tree.

npm install under npm 12 installs dependencies according to their SemVer range specified in package.json and ignores the lower locked versions specified in npm-shrinkwrap.json.

Change

To ensure that dependencies are consistently installed by downstream consumers of citgm, whichever version of npm is being used to execute the Installation instructions npm install -g citgm, rename:

npm-shrinkwrap.json to package-lock.json.

This should be considered a breaking change (semver-major) when the next release is cut.

Checklist
  • npm test passes (for currently bundled versions of npm 10.x & 11.x)
  • contribution guidelines followed
    here

npm 12 does not support npm-shrinkwrap.json

semver-major change since npm install -g citgm will
install dependencies according to the published package.json,
ensuring consistency independent of npm version used.

package-lock.json is only used for repo development and test.

Signed-off-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
@codecov-commenter

codecov-commenter commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.20%. Comparing base (4638628) to head (e7300df).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1129   +/-   ##
=======================================
  Coverage   96.20%   96.20%           
=======================================
  Files          29       29           
  Lines        2213     2213           
=======================================
  Hits         2129     2129           
  Misses         84       84           

☔ 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.

@MikeMcC399
MikeMcC399 marked this pull request as ready for review August 19, 2026 11:46
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 12 - drops npm-shrinkwrap.json

2 participants