feat(arborist)!: install optional peer dependencies#5301
Conversation
|
Optional peer dependencies are intended to be optional, so they shouldn't be installed by default (and in fact you even have open bugs suggested you're already installing them, against their semantics). With this change, what difference do you see between peer deps and optional peer deps, in npm? 🤔 |
the same as the difference between tbh i think i'd rather stop installing optional dependencies than start installing optional peers by default, but there's definitely more thinking and talking to be done before we land on a decision. |
|
i've converted this pull request back to a draft to convey that it is only a proposal. we have a lot of things to consider before changing something like this. |
3037d35 to
f3b0c43
Compare
current versions of npm do not attempt to install optional peer dependencies, this feature changes that. one caveat of this is that in the event of an optional peer and a regular peer conflicting, we will allow the optional peer to become invalid (meaning the non-optional peer takes precedence). we opted to take this approach in the hopes that it would minimize new
ERESOLVEerrors due to these new dependencies being installed.for the moment we're considering this as a breaking change due to the potential for
package-lock.jsonchurn, as well as the potential for new bugs to surface. as such, it is unlikely that we will land this change before the first release of npm 9.closes #4859