David Nogueira
David Nogueira

Reputation: 1

Is it advised to push yarn.lock when we don’t have any new dependency?

If package.json didn’t suffer any modifications, do we still have to push yarn.lock?

When:

  1. I delete node_modules folder
  2. I Delete yarn.lock file and
  3. I run the yarn install command,

Even if I didn’t add anything to the package.json, the yarn.lock will be generated with a different configuration.

So, as we have all the dependencies we need to run the project in package.json is it important to commit yarn.lock if we didn’t change package.json?

Upvotes: 0

Views: 1194

Answers (1)

Divyansh
Divyansh

Reputation: 41

No, if there are no modifications in the dependency you can skip the lock file. This file locks the dependencies with the versions installed.

Upvotes: 1

Related Questions