lerna run does not respect the topology
See original GitHub issuelerna run does not respect libs the topology Workspace created using Angular cli (angular version 8.2.3)
Expected Behavior
should respect topology according to devDependencies in package.json
Current Behavior
building in some random order
Possible Solution
Steps to Reproduce (for bugs)
create a workspace using Angular cli (8.2.3) in the following toplogy:
libs–> business –> lib a –>lib b (depend on a,c,d) –> services –>lib c (depend on e) –>lib d –>shared –> **lib e ** –>ui –>lib f –>lib g (depend on f)
define the libs dependencies and “build” script in pacage.json file run lerna build
lerna.json
{
"packages":
[
"./libs/**/*"
],
"version" : "independent"
}
Context
cant create CI CD to my Project using lerna
Your Environment
| lerna --version
| 3.18.3|
| npm --version
| 6.4.1 |
| node --version
| 10.14.1 |
| Windows 10 |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:11
Top Results From Across the Web
Things I wish I had known when I started JavaScript monorepo ...
These scripts should use lerna run <script> command which respects the packages topology and runs the script in every monorepo package that ...
Read more >@lerna-lite/run - npm
Similar to --stream , but completely disregards concurrency and topological sorting, running a given command or script immediately in all ...
Read more >@lerna/clean | Yarn - Package Manager
A package is considered "updated" using the same rules as lerna updated . ... With this flag, lerna exec will run the command...
Read more >Lerna NPM | npm.io
Add lerna as a devDependency in package.json if it doesn't already exist. ... lerna run respects the --concurrency , --scope , --ignore ,...
Read more >How to run lerna sequentially? - Stack Overflow
So, that still doesn't guarantee sequential execution since multiple packages may have the same priority in the topological order and hence, may ...
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
I was setting up a TypeScript monorepo today and noticed this as well.
It only seems to happen when I use the
parallel
option. When usingconcurrency
withoutparallel
it works as expected.Looking at the source code this is the actual behaviour: https://github.com/lerna/lerna/blob/72414ec1c679cf8a7ae4bfcefce52d50a6120a70/commands/run/index.js#L76-L82
More to that i can see that your are using yarn workspace and i am not.