1

We have multiple repositories that are added locally in one yarn workspace

packages
 - Repo1
 - Repo2
 - Repo3
package.json
yarn.lock

Team1: only needs Repo1&2 so they do not checkout Repo3

Team2: only needs Repo1&3 so they do not checkout Repo2

This works fine but we have one issue with the lockfile. If I am on team 1 and do yarn install, then there would only be the deps of Repo1 and 2 included and if I am on team 2 there would only be the deps of 1 and 3 included.

So it is not possible to have a shared lockfile as we would overwrite it constantly.

Our idea now would be that we have multiple lockfiles like maybe this

packages
- Repo1
- Repo2
- Repo3
package.json
team1-yarn.lock
team2-yarn.lock

Is it possible to have a configuration with yarn so that I can change how the name of the lockfile is? Or do you see any other way how this could be achieved?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Bene
  • 874
  • 1
  • 10
  • 15

0 Answers0