-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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: List optional peer dependencies #1626
Conversation
Hmm, what happens wit yarn < 1.13.0 and npm < 6.11.0. I guess |
Yep. For those package managers it would create warnings. However, this should be preferred over creating incomplete dependency trees. |
I think it makes more sense to add them as optionalDependencies if build failures do not cause installation to fail as per description. See discussion in #1220. |
The main difference is that peer dependencies are not installed by default which is nice. I like optional peer dependencies. The only thing I don't like is the warning that is raised with older versions of npm/yarn. |
Yeah I can't help you with deciding what strategy to use since I only encountered this package as a transitive dependency.
Heard this fairly often but IMO I'd rather have a warning (with a fix by upgrading the package manager) that does no harm instead of a dependency tree that is potentially broken. Especially with the amount of dependencies in the JS ecosystem you do not want to debug your dependency tree ever. That's what package managers are for but they require information from the packages. |
I'll wait until |
Thank you. |
Listing packages mentioned in https://github.com/websockets/ws#opt-in-for-performance-and-spec-compliance as optional peer dependencies.
Additional context:
yarn@1.13.0
,npm@6.11.0
but not yet bundled with node andpnpm@?
I'm currently not using this feature myself until node bundles
npm@6.11
. Just creating this PR now so that we can discuss any concerns you have.