Yarn creates a yarn.lock
file after you perform a yarn install
.
Should this be committed to the repository or ignored? What is it for?
Yes! yarn.lock
must be checked in so any developer who installs the dependencies get the exact same output! With npm [that was available in Oct 2016], for instance, you can have a patch
version (say 1.2.0) installed locally while a new developer running a fresh install
might get a different version (1.2.1).