publish --canary should have some way of limiting publish to changed packages only
Author: darrylhodginsCreated Aug 7, 2017Updated Mar 13, 2026
Labelstype: feature
Expected Behavior
In much the same way that lerna publish behaves (by only publishing packages with changes, plus packages with dependencies on those), lerna publish --canary should have some way to restrict publishing to only those packages with changes.
Current Behavior
Currently, publish --canary forces inclusion of all packages (here, in UpdatedPackagesCollector.js)
Possible Solution
Use the --since flag to filter out unchanged packages.
Context
In a project with a large number of packages, being able to create --canary builds on only packages that have actually changed since the last release would save significant time. In my project, this would reduce the build time by at least 80%.
Source: lerna/lerna