I have a monorepo and I am using yarn workspaces and lerna to manage it. I had no issues with it until now. I need to know all the changed packages since the last release.
So I run lerna changed
(docs), but this is what it returns:
info cli using local version of lerna
lerna notice cli v3.16.4
lerna info Looking for changed packages since v0.3.0
lerna info No changed packages found
Similarly, lerna doesn't find any packages when running lerna list
(docs):
info cli using local version of lerna
lerna notice cli v3.16.4
lerna success found 0 packages
It seems like something is broken. But I can't find any issues in my setup.
├── lerna.json
├── package.json
├── packages
│ ├── enums
│ ├── event-sourcing
│ ├── models
│ └── utils
└── services
├── consumer
├── frontend
├── gateway
└── ideas
{
"packages": [
"packages/*",
"services/*"
],
"version": "0.3.0",
"useWorkspaces": "true"
}
{
"name": "cents-ideas",
"version": "0.0.0",
"workspaces": [
"packages/*",
"services/*"
],
"private": true,
"devDependencies": {
"lerna": "^3.16.4",
"npm-run-all": "^4.1.5",
"rimraf": "^3.0.0",
"typescript": "^3.6.2"
}
}
The entire repository is on GitHub, if you want to take a closer look at it.
The solution is very simple. As all my packages have a "private": true
in their package.json
files, I need to add the --all
flag.
lerna changed --all
lerna list -all
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With