Optional peer dependencies #3066
Comments
+1 |
@domenic any tips on where / how to implement this feature ? |
I saw issues regarding peer dependencies, optional, bundled, dev, optional peer, optional dev, not to mention exotic stuff binDependencies, did I miss something? Guys, what about declaring those properties as flags? We can use syntax like that:
It would really reduce this keyword clutter. |
Sounds nice. Maybe something like this would be even more flexible and future proof:
|
Sadly I don't think we should change the syntax like that. It makes things very verbose and what we have works pretty well in practice. It should probably be a separate issue for discussing this though. |
@donaldpipowitch Better array:
|
Yes, indeed. This should just be pseudo code. An array would be better :) |
|
+1 |
To all who are still interested in optional peer dependencies, I've released a solution to this at https://github.com/Wizcorp/codependency . In a nutshell, it allows for a Features:
I hope it can help middleware development, and I would love to get any feedback you may wish to share. Thanks! PS: If you're still interested, I wrote a tumblr post about this. |
@othiym23 is this something that will be integrated? |
@fixe It's not something that's on the development team's radar, so probably not anytime soon. |
|
Optional peer dependencies would be very useful for modules that only conditionally require other modules. See uphold/validator.js-asserts#35 for an example. |
Given that |
Then let me be the one declaring victory :) I think it's a great change and it completely satisfies my request. Thanks! |
As all Additionally, the ending EPEERINVALID warning message states "mongodb-core@1.2.21 requires a peer of kerberos@~0.0 but none was installed." Perhaps the required verbiage should be changed to something like "packageX has an optional peer of packageY but none was installed"? This is most evident with a screenshot: $ npm -v
3.3.9
$ npm i -S mongoose @othiym23 I believe updating these messages is a remaining actionable task. |
I agree with @fyockm. |
i'm in the same shoes with @fyockm. But now i'm stucked, i cannot use because i got:
using npm 3.5.0 |
optionalPeerDependencies would be useful for declaring dependencies on shims. I'd like to specify in my Additionally I agree with @fyockm that the current error messaging is confusing and while I haven't tried it @tgabi333 issue with npm shrinkwrap looks like a legit issue. For now I'm going to make |
It would be better to make this one an optionalPeerDependency but npm currently doesn't support making peerDependencies optional. See: npm/npm#3066
It would be better to make this one an optionalPeerDependency but npm currently doesn't support making peerDependencies optional. See: npm/npm#3066
It would be better to make this one an optionalPeerDependency but npm currently doesn't support making peerDependencies optional. See: npm/npm#3066
To be later used as a peerDependency in the generated package.json It would be better to make this one an optionalPeerDependency but npm currently doesn't support making peerDependencies optional. See: npm/npm#3066
This is actually an inherited dependency that comes from zone.js. See related issue: angular/zone.js#212 It would be better to make this one an optionalPeerDependency but npm currently doesn't support making peerDependencies optional. See: npm/npm#3066
To be later used as a peerDependency in the generated package.json It would be better to make this one an optionalPeerDependency but npm currently doesn't support making peerDependencies optional. See: npm/npm#3066
It would be useful to have a way of specifying something equivalent to peerDependencies but where they are optional. As discussed in #1400
The text was updated successfully, but these errors were encountered: