Fresh Hold

Check a package-lock.json for freshly published versions

Drop package-lock.json or npm-shrinkwrap.json. Lockfile versions 1, 2 and 3 are read, including nested and aliased packages.

days (1 to 90)

Each package's full registry record is downloaded to read its publish dates. A lockfile with hundreds of packages can mean tens to hundreds of megabytes.

Why check package-lock.json after an install?

npm install resolves every caret and tilde range to the newest matching version and writes it into package-lock.json. One routine install can therefore pin a version that went up an hour ago, deep in the tree where no one reviews it. Reading the lockfile shows exactly which of those versions are still inside the window when compromised releases are usually spotted and unpublished.

Questions

Which package-lock.json versions work?

lockfileVersion 1, 2 and 3, and npm-shrinkwrap.json. Version 2 and 3 files are read from their packages section; version 1 files from their nested dependencies.

How do I hold back a flagged version?

Add an overrides entry in package.json that pins the package to an older version, run npm install, and check the lockfile again.

Are private package names sent to npm?

No. package-lock.json records each package's resolved address, so entries from another registry, git, a file or a workspace are listed as not looked up and their names are not sent.

Other lockfiles