Possibility to run lerna command in changed packages only
See original GitHub issueIs it possible to somehow pass the result of lerna changed
to lerna run --scope
or lerna exec -- --scope
?
It seems like lerna already does all the git magic necessary to get the packages that changed, but how can you easily use this result to run commands (for example I want to deploy to netlify instead of publish to npm or only run tests in my ci in changed packages) without getting the previous git tag manually yourself (if you are on master branch) to use with the since
flag or comparing to master using since
if you are on a feature branch?
Expected Behavior
Allow multiple packages to be passed to scope filter or allow lerna changed to be used in conjunction with a flag like since
for example.
Current Behavior
It does not, see above.
Possible Solution
See expected behavior.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:17
- Comments:10 (2 by maintainers)
Top Results From Across the Web
How to deploy only changed packages in a Lerna Monorepo
Deploy only changed packages. The only command you need to know is “lerna run” , it simply runs an npm script in each...
Read more >Lerna run only on changed packages - monorepo
It allows us to run commands against staged files. So if you only changed stuff in packageA - linting, prettiering or running tests...
Read more >@lerna/publish - npm
lerna publish # publish packages that have changed since the last release lerna publish ... When run, this command does one of the...
Read more >@lerna/changed | Yarn - Package Manager
When you run the new command lerna repair , lerna will execute a series of code migrations/codemods which update your workspace to the...
Read more >Untitled
When run, this command will: 1. `npm install` all external dependencies of each package. 2. Symlink together all Lerna `packages` that are dependencies...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Came across this when searching for the same thing, method seems to be to use
lerna run
with--since
flageg
you don’t need to run
lerna changed
It’s right there in the docs:
When in
master
,npx lerna run test --since
will do what everyone in this thread seems to want.