Auto: lerna independent with only 'git-tag' and 'released' plugins doesn't create independent releases

Created on 13 Aug 2020  ·  8Comments  ·  Source: intuit/auto

Describe the bug

When you add the 'minor' or 'major' label in your PR, and with lerna in independent mode, one would expect the versioning of components to be independent. This is not reflected in the versioning at the moment, where a semver tag vx.x.x for the whole project is created, instead of the tag f,ex @org-name/[email protected]

To Reproduce

see https://github.com/LEGO/poc-yarn-lerna-workspaces-auto-typescript-tags

Expected behavior

the option to specify versioning (as this might be a breaking change from the current behavior, or even a major rewrite judging from what I am asking for here) in the same way as we would for releases that have packages attached to them.

if this is not the intention of how the git-tag plugin is to be used, we are looking at a scenario where we have a monorepo with npm projects in a monorepo that need not to be published to npm/packages, but still require independent versioning

bug released

Most helpful comment

That being said though I do see situation where this doesn't work. Say a PR only effects a private package, you'd still want the package versioned, just not published. Seeing if I can improve this now

All 8 comments

So all of the "publishing" plugin are meant to only be used 1 at a time. So you either use npm or git-tag.

we are looking at a scenario where we have a monorepo with npm projects in a monorepo that need not to be published to npm/packages, but still require independent versioning

I think you can accomplish this just by setting private to true on the packages you don't want to publish. They will still get versioned they just won't make it to the registry

I've added some docs to clear this confusion up for future users. https://github.com/intuit/auto/pull/1465/files

Do you have any other questions?

This clears things up from what your vision is for auto, very helpful

So all of the "publishing" plugin are meant to only be used 1 at a time. So you either use npm or git-tag.

we are looking at a scenario where we have a monorepo with npm projects in a monorepo that need not to be published to npm/packages, but still require independent versioning

I think you can accomplish this just by setting private to true on the packages you don't want to publish. They will still get versioned they just won't make it to the registry

Hello! I tried the suggestion with setting private to true in the packages, but then I get this error here (it is under Create Release)

That's actually not a bug. The verbose output is a little misleading though. Sometimes auto will run a command to see the result. Sometimes that result is a failure. In verbose mode we log a lot of responses, this include things that contain text saying "error" in them.

In this case npm plugin will run lerna updated to check if there will be any packages to publish during the shipit run. If there aren't any we exit early so the publish doesn't fail later. if you had ran without -v the last line printed would have been

⚠  warning   Lerna detected no changes in project. Aborting release since nothing would be published.

That being said though I do see situation where this doesn't work. Say a PR only effects a private package, you'd still want the package versioned, just not published. Seeing if I can improve this now

Think this should be fixed now!


:rocket: Issue was released in v9.50.8 :rocket:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shilman picture shilman  ·  7Comments

thuringia picture thuringia  ·  14Comments

theAdhocracy picture theAdhocracy  ·  6Comments

tunnckoCore picture tunnckoCore  ·  4Comments

zephraph picture zephraph  ·  10Comments