-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(npm): optional dependencies fix #1215
Conversation
we use peer deps because optional deps will be installed unless you use |
With In contrast, the solution I am proposing is zero configuration, it doesn't break anything in NPM 4 and aligns the package to the default NPM usage as documented in the command line and https://www.npmjs.com/ |
Just adding a test case here:
There is no way to ignore Tested with npm@4.1.2 and node@7.5.0 |
do you need to shrinkwrap that badly? |
Unfortunately there really aren't any sane alternatives to |
It does make sense that they should become truly "optional" dependencies, but yes it does mean they won't be installed. I'm personally ok with the change (it will stop many questions about the installation errors as well). Can anyone else weigh in? |
I rather dislike all of the warn errors every time I update a package. The real issue, in my opinion, is that NPM needs better support for peerDependencies. For the time being, however, I think it appropriate that we switch to optionalDependencies. The most common side effect of this change will likely be people complaining about how installing didn't work, to which we will just have to point out that |
Using
Use yarn if you want to lock your dependencies to specific versions. NPM's optional dependency support is hot garbage. |
I don't mind this turning into a discussion as long as the discussion is reasonable in provided solution. Right now, your biggest nightmares of having all those modules installed in the dependency tree is a requirement for any bot to be deployed in a stable, production environment. I understand the need for non-breaking changes but right now this package is incomplete - not deployable without everything in Do you just don't want people to build bots using this framework ? |
There are a lot of people who built production ready bots based on this framework/library already. But you might have to enlighten me how peerDependencies make this package incomplete and not deployable without everything in the peerDependencies installed? The issue with putting everything into optionalDependencies is that, as explained above your comment, some things simply cannot coexist with others. |
@iCrawl https://docs.npmjs.com/ I have made a simple fix. For a simple problem. It is true Facts:
I understand some of your users have difficulty using NPM as it was intended and they need to receive this information in a manner that will make them pay attention to the defaults. In light of all the excess discussion though I am wondering if those
I understand this package is used by many people - that doesn't mean this issue isn't real. I don't want to change the "core values" of this package but it is also very difficult for me to figure them out in light of this discussion. Please assert and communicate what the required parameters of the fix are and I will follow through |
In favour of new requirements I moved this over to #1222 |
Peer dependencies disable
npm shrinkwrap
unless they are installed - rendering the dependencies as effectively NOT optional.