Should you be committing yarn.lock file?

Ans: Yes

In order to understand Yes, let’s dig down a bit on story of yarn.lock file

How Yarn maintains package consistency across machines?

It’s done in 2 ways

    1. Yarn created entire dependency tree using a deterministic algorithm before downloading packages from everchanging third party packages
    2. All the info related to dependency tree is maintained in yarn.lock file so that it can be shared between every system installing the dependencies.

… To be continued