Check a yarn.lock for freshly published versions
Drop yarn.lock from Yarn 1 (classic) or Yarn 2 and later (Berry). Every resolved registry version is looked up once. Berry lockfiles do not record the registry, so every npm: name in them, private ones included, is sent to registry.npmjs.org.
Why check yarn.lock after an upgrade?
yarn upgrade and yarn up rewrite yarn.lock with the newest versions your ranges allow, and a single entry can serve several ranges at once. A release published this morning can slip in under a range you wrote years ago. Checking the resolved versions against their publish dates shows which ones have not yet had time to be reviewed by the wider community.
Questions
Does it read Yarn Berry lockfiles?
Yes. Berry entries resolved with npm: are looked up. Patched, workspace and git entries are listed as not looked up, with the reason.
How do I hold back a flagged version in Yarn?
Add a resolutions entry in package.json that pins the package to an older version, run yarn install, and check the lockfile again.
Are private package names sent to npm?
From Yarn classic, no: entries resolved from another registry are listed as not looked up. Yarn Berry does not record the registry in yarn.lock, so every npm: name in a Berry lockfile is sent to registry.npmjs.org, including private scoped names such as @acme/internal-auth. Check a Berry lockfile with private packages only if that is acceptable.