How to run command on each workplace, which has changes since last commit?


I am trying to run the command on workplaces, which were changed since last commit:

 yarn workspaces foreach --verbose --since --no-private npm info

My yarnrc.yml includes this setting to specify the previous commit

  - HEAD~

But it still runs on all workspaces.

I tried checking changes with

yarn version check

And it shows the exact 2 packages that were changed.

Do you have any ideas on how to do it?


You need to add -R tag

yarn workspaces foreach --since --no-private -R npm info

Find packages via dependencies/devDependencies instead of using the workspaces field. Here you can read more:

Answered By – Victoria Unizhona

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published