yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.4k stars 2.72k forks source link

`yarn check --verify-tree` does not verify workspaces packages #7293

Open kuceb opened 5 years ago

kuceb commented 5 years ago

Do you want to request a feature or report a bug? bug

What is the current behavior? I use workspaces, and have packages located in packages/*.

Currently, when I run yarn check --verify-tree, errors only report on the root workspace package.json, not the subpackages. I can change a subpackage's dependency version in its package.json, and the check will still pass.

This happens no matter what directory I'm in.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior? I expect yarn check --verify-tree to recurse my workspace packages and report any node_modules mismatches with the version listed in the package.jsons

Please mention your node.js, yarn and operating system version. OS: Ubuntu 19.04 Nodejs: 8.9.3 yarn: 1.16.0

bensampaio commented 5 years ago

I have the exact same problem. I want to use yarn check --verify-tree to check in my CI if yarn install needs to be run. However, it is only taking the root packages into account.

Is there any update on this?

kitfit-dave commented 4 years ago

It seems like yarn check does not work at all with workspaces.

yarn check from monorepo root checks something... not much in my case, totally different output from the third option below yarn workspaces check is an invalid command yarn workspace mypackage check or running yarn workspace mypackage check from packages/mypackage both kind of seem to run check against all packages (i.e. running from within any package might be running against all packages), but there is no package name prefix to the messages like there are with other commands...