yarnpkg / berry

📦🐈 Active development trunk for Yarn ⚒
https://yarnpkg.com
BSD 2-Clause "Simplified" License
7.37k stars 1.1k forks source link

Filter workspaces for outdated packages #3374

Open rightaway opened 3 years ago

rightaway commented 3 years ago

Using yarn workspaces means you probably have a lot of dependencies for various projects. If you only want to upgrade dependencies for certain packages you can't see just those packages in yarn outdated and yarn upgrade-interactive. With hundreds of dependencies it becomes impossible to handle.

yarn outdated and yarn upgrade-interactive need a filter to just include certain workspaces and filter out certain workspaces. Or at the very least it should take into account the directory you're running the commands from. Even if you run it from a particular workspace it still shows the dependencies from the entire project.

semanser commented 3 years ago

@arcanis What do you think about adding a --filter=<workspace_name> flag? I can open a PR for that.

rightaway commented 3 years ago

@semanser That would be great. Would it be possible for yarn outdated as well as yarn upgrade-interactive?

If I pass --filter @workspace, could that include everything that workspace and everything under it like @workspace/project1 and @workspace/project2?