Skip to content

Clarify how libraries should use yarn.lock #255

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

Closed
Pauan opened this issue Nov 11, 2016 · 2 comments
Closed

Clarify how libraries should use yarn.lock #255

Pauan opened this issue Nov 11, 2016 · 2 comments

Comments

@Pauan
Copy link

Pauan commented Nov 11, 2016

In yarnpkg/yarn#1067 there was a discussion about whether libraries should check in yarn.lock or not.

In other ecosystems like Ruby or Rust, the advice is that applications should check in the lock file, but libraries should not.

Yarn seems to take a different approach, always advocating for checking in yarn.lock. This leads to confusion for library authors.

I tried to create a summary of the various reasons to check in (or not check in) yarn.lock

I think it would be useful for the Yarn documentation to clarify how libraries should treat yarn.lock

Even if the consensus is that libraries should always check in yarn.lock, it would be useful to have a paragraph saying "you should always check in yarn.lock, even for libraries"

@jamiebuilds
Copy link
Contributor

All projects (applications and libraries) should check in the yarn.lock file. I made that more specific on the site a few days ago: https://yarnpkg.com/en/docs/yarn-lock#toc-check-into-source-control

@Pauan
Copy link
Author

Pauan commented Nov 21, 2016

@thejameskyle Thanks, that helps a lot! 👍

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