You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the latest version of npm-check-updates
I am using node >= 10.17
When running npm-check-updates, it updates versions in peerDependencies by default. This is fundamentally wrong. When using peerDependencies, you should always try to select the most permissive version possible, i.e. the lowest possible version that works. Where possible, it's even better to have multiple major versions as options. Setting this unnecessarily high makes the library overly restrictive, maximizing the chance of a conflict with the consuming project's dependencies, thus minimizing its utility.
E.g. If I create a component library for React that uses hooks (introduced in 16.8), the ideal values would be:
That makes a lot of sense. Thanks for the explanation! I think we should change the default behavior to exclude peerDependencies on the next major version.
npm-check-updates
node >= 10.17
When running
npm-check-updates
, it updates versions inpeerDependencies
by default. This is fundamentally wrong. When usingpeerDependencies
, you should always try to select the most permissive version possible, i.e. the lowest possible version that works. Where possible, it's even better to have multiple major versions as options. Setting this unnecessarily high makes the library overly restrictive, maximizing the chance of a conflict with the consuming project's dependencies, thus minimizing its utility.E.g. If I create a component library for React that uses hooks (introduced in 16.8), the ideal values would be:
or for a library supplementing jest, it should have:
I realize that I can use the
--dep
flag for this, but there really isn't a valid case for maximizing this value...The text was updated successfully, but these errors were encountered: