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

Add moment.js to peerDependencies #18

Closed
jchavarri opened this issue Dec 18, 2017 · 3 comments
Closed

Add moment.js to peerDependencies #18

jchavarri opened this issue Dec 18, 2017 · 3 comments

Comments

@jchavarri
Copy link

jchavarri commented Dec 18, 2017

Really minor :) for consumers to get the original moment package when downloading the bindings and avoid version mismatches, it should be better moved to dependencies (now it's in devDependencies). Edit: better add it to peerDeps, see below 👇

@jimexist
Copy link
Owner

for consumers to get the original moment package when downloading

i think the users should try to add moment in their own package.json

avoid version mismatches

a better solution is to include moment in peer dependencies. but for dev dependencies it's for the sake of developing in this repo.

@jchavarri
Copy link
Author

Interesting. I guess I was thinking on cases where you start a project from scratch, but peerDependencies definitely makes more sense for JavaScript projects that already exists, and are progressively migrated to Reason / OCaml, as there are instances of moment.js objects being passed around. This article helped me understand better when to use peerDependencies, depending if abstract types are being accepted or returned from the public interface contract.

It seems other projects in a similar situation like grunt-contrib-clean also have devDependencies and peerDependencies (relevant issue)

@jchavarri jchavarri changed the title moment should be in dependencies Add moment.js to peerDependencies Dec 19, 2017
@jimexist
Copy link
Owner

@jchavarri FYI this is now added

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