You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature is important to have in this repository; a contrib plugin wouldn't do
Describe the user story
As a developer working in a monorepo, I frequently need to install and build only packages that have changed since a specific git reference, particularly in CI environments. Whilst yarn workspaces foreach supports the --since flag for running commands on modified workspaces, this capability is absent from yarn workspaces focus. This deficiency forces me to either install all workspaces or manually identify changed ones, which is terribly inefficient in larger monorepos with numerous interdependencies and significantly increases CI execution times.
Describe the solution you'd like
Add a --since flag to the yarn workspaces focus command that works exactly like the existing implementation in yarn workspaces foreach. When specified, Yarn would only focus on workspaces that have been modified since the specified git reference. This would dramatically reduce CI build times—potentially by 50-80% in large monorepos where only a small subset of packages changes between runs
Describe the drawbacks of your solution
Whilst this adds complexity to the codebase that may be less beneficial in zero-install scenarios (as noted in the existing focus documentation), I believe the implementation complexity should be minimal given that the --since option already exists within yarn workspaces foreach and could likely share much of the same code.
Describe alternatives you've considered
Given that the --since flag is already successfully implemented in yarn workspaces foreach, extending this functionality to yarn workspaces focus would provide a consistent developer experience across Yarn commands, reduce CI execution times significantly, and eliminate the need for workarounds or external tools
The text was updated successfully, but these errors were encountered:
Describe the user story
As a developer working in a monorepo, I frequently need to install and build only packages that have changed since a specific git reference, particularly in CI environments. Whilst yarn workspaces foreach supports the --since flag for running commands on modified workspaces, this capability is absent from yarn workspaces focus. This deficiency forces me to either install all workspaces or manually identify changed ones, which is terribly inefficient in larger monorepos with numerous interdependencies and significantly increases CI execution times.
Describe the solution you'd like
Add a --since flag to the yarn workspaces focus command that works exactly like the existing implementation in yarn workspaces foreach. When specified, Yarn would only focus on workspaces that have been modified since the specified git reference. This would dramatically reduce CI build times—potentially by 50-80% in large monorepos where only a small subset of packages changes between runs
Describe the drawbacks of your solution
Whilst this adds complexity to the codebase that may be less beneficial in zero-install scenarios (as noted in the existing focus documentation), I believe the implementation complexity should be minimal given that the --since option already exists within yarn workspaces foreach and could likely share much of the same code.
Describe alternatives you've considered
Given that the --since flag is already successfully implemented in yarn workspaces foreach, extending this functionality to yarn workspaces focus would provide a consistent developer experience across Yarn commands, reduce CI execution times significantly, and eliminate the need for workarounds or external tools
The text was updated successfully, but these errors were encountered: