0

Same question asked here but using lerna publish and yarn workspaces instead of pnpm publish...

  1. Publishing five packages in a monorepo
  2. Using lerna fixed/locked mode for versioning.
  3. Version to be produced is 2.0.0.
  4. Assume yarn workspaces and the lerna.json are setup correctly.
  5. Four of those packages are dependent on a package in the monorepo called foo. Each of those four packages have a yarn workspace dependency like this...
{
    "dependencies": {
        "foo": "workspace:*"
    }
}

When I perform a lerna publish, will it automatically replace workspace:* in the four packages with 2.0.0? I didn't see this explicitly stated with regard to yarn workspaces on https://lerna.js.org/docs/features/version-and-publish. I assume it would be similar to pnpm but thought I'd check just in case.

nstuyvesant
  • 1,392
  • 2
  • 18
  • 43
  • there shouldn't be any differences with pnpm and yarn output, at least I think. On the other hand [Lerna-Lite](https://github.com/lerna-lite/lerna-lite), that I maintain, offers a `--dry-run` flag which is helpful to see exactly what gets produced, I think Lerna will add such flag in their future major version – ghiscoding May 03 '23 at 14:16
  • That is a feature coming to lerna 7 that would answer this definitively! – nstuyvesant May 03 '23 at 14:24

0 Answers0