-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
If a sub-dep releases a version which breaks a dep, this can break an entire app until a bug fix is issued. The workaround is to fork the deps, modify them, publish them, and change the require statments. This a painful, and bites me often.
A way to manually specify a sup-dep version would be very useful, and it is essentially what the shrinkwrap file does.
A command like pnpm lock [email protected], which would prevent a level 3 dep from updating.
This command would create a key in package.json like:
{
"lockedDependencies": {
"foo.bar.baz": "1.0.0",
}
}
There would then be a warning each time a pnpm install is done to indicate that a dep is being locked.
So its basically like a manual shrinkwrap entry.
If this is too far out of scope for pnpm, it would be cool to have this functionality (manually specifying sub-dep) exposed in the pnpm api so that another tool could implement it.