2

I've cloned a monorepo I was working on onto a new dev machine, all packages from the repo have been published already. But when I run lerna changed - it says "assuming all packages changed" and lists all the packages from the repo. And if I run lerna publish from-package - it correctly says that there's nothing to publish.

My lerna.json

{
  "packages": [
    "packages/*"
  ],
  "command": {
    "publish": {
      "registry": "https://npm.pkg.github.com/"
    }
  },
  "npmClient": "yarn",
  "useWorkspaces": true,
  "version": "independent"
}

Any idea why it's doing this and how I can make changed correctly detect only changed packages?

CoryCoolguy
  • 1,065
  • 8
  • 18
Yuriy Galanter
  • 38,833
  • 15
  • 69
  • 136

2 Answers2

3

I ended up using lerna ls --since master instead. Since all PRs in our case are done from other branches into master, comparing working branch to master seems to make sense.

Yuriy Galanter
  • 38,833
  • 15
  • 69
  • 136
1

I had the same problem. This worked for me:

lerna publish ----include-merged-tags
CimChd
  • 191
  • 6