3 ms·
Should you commit the yarn lockfile to version control?
by nawitus 10y ago
Should you commit the yarn lockfile to version control?
- steveklabnik 10y agoI don't know about yarn specifically, but for all the systems it's modeled after, the answer is "yes for binaries, no for libraries".
- FLGMwt 10y agoDocs here [1] say yes. It also seems to imply that this is edited by the `yarn` command so it would be invalidated if you manually edited your `package.json`? Dunno if it's destructively invalid though. 1: https://yarnpkg.com/en/docs/configuration#toc-use-yarn-lock-to-pin-your-dependencies https://yarnpkg.com/en/docs/configuration#toc-use-yarn-lock-...
- quaunaut 10y agoYes. This makes it part of code reviews and is what keeps everyone who might ever use the project(whether human or CI) using the same libraries.