3

Is there a reason for not doing so?

My idea is that the potential git diff will happen in package.json. I would like to treat the yarn.lock as a binary.

2 Answers 2

3

I don't see any reason to not treat it as so, as it is a file which is not meant to be read by humans.

I have been using it as a binary in a large team for more than one year and we didn't have any problems. And nobody who I talked to run into problems too - please comment if you have, as I am trying to implement it again in another company.

Merge conflicts can be resolved installing the packages again. Talk with your team about this topic and give it a go.

1

I posted this question in Yarn's issue tracker on GitHub. I got the following answer:

No it shouldn't. The file is plain text and there can be merge conflicts in the file that you may need to resolve.

https://github.com/yarnpkg/yarn/issues/1776#issuecomment-260022242

2
  • 3
    There have been updates in the issue. For anyone reading this, it's worth to check the issue to see the recommended method of resolving the merge conflicts.
    – luislhl
    Jun 14, 2017 at 19:13
  • Staring down the barrel of 97 merge conflicts. This file!
    – Mark
    Sep 1, 2021 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.