Skip to content
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

Why is mongodb included as a peerDependency? #179

Closed
srlowe opened this issue Oct 10, 2015 · 4 comments
Closed

Why is mongodb included as a peerDependency? #179

srlowe opened this issue Oct 10, 2015 · 4 comments

Comments

@srlowe
Copy link

srlowe commented Oct 10, 2015

Seems like it would be more appropriate to include it as a regular dependency. I've seen some weird npm install/uninstall behaviour related to this.

@vkarpov15
Copy link
Contributor

Similar reasons to https://nodejs.org/en/blog/npm/peer-dependencies/ . Things like https://github.com/kissjs/node-mongoskin/blob/master/lib/helper.js won't work quite right if you have mongoskin depending on one version of mongodb and are using another version of mongodb.

@srlowe
Copy link
Author

srlowe commented Oct 13, 2015

What if someone upgrades the root mongodb installation? Won't that potentially cause problems for mongoskin?

@vkarpov15
Copy link
Contributor

In theory no, mongoskin is meant to be a much thinner layer on top of the mongodb driver than say mongoose. As a matter of fact, nowadays the features mongoskin provides that the mongodb driver doesn't are pretty limited, mostly just findById and a marginally better ObjectId checker, both of which are unlikely to be affected by patch releases.

@srlowe
Copy link
Author

srlowe commented Oct 13, 2015

Ok. Thanks for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants