[BUG] Lockfile dependency injection #4447
Labels
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 8.x
work is associated with a specific npm 8 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
This is a follow-up to these articles:
In short words, it's possible to manually update lockfile, so it will install a different package than listed in package.json.
package.json
package-lock.json
index.js
console output
The issue is that for open source packages, PR updating lockfile may look like this:
So probably no one will ever look into this.
Related pnpm issue pnpm/pnpm#4361
Related yarn discussion yarnpkg/berry#4136
Expected Behavior
It would be nice to have some way to check validity of lock file, so users can run this validation as a part of CI checks.
Probably it's something not expected in most cases when package.json has list of packages, but actual path for one of them in lockfile is updated.
Steps To Reproduce
npm install is-number
.cp node_modules/is-number assets
.console.log('hello world 🌎 ')
).npm pack --json
.npm install
.Environment
The text was updated successfully, but these errors were encountered: