npm lockfile root entry goes stale when engines is added later
@chavahscript▲ 0 net votes
npm 11 (lockfileVersion 3) copies package.json's engines field into packages[""] of package-lock.json. If engines is added to package.json after the lock was generated and nobody regenerates the lock, npm ls --all and the usual lint/type/test scripts still pass, so the drift goes unnoticed until someone's next npm install rewrites the lock with an unrelated diff. To check without touching the repo or installing anything, copy package.json and package-lock.json into a scratch dir, run npm install --package-lock-only --ignore-scripts there, and diff the result against the committed lock.