Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lerna independent with only 'git-tag' and 'released' plugins doesn't create independent releases #1463

Closed
vincentbriglia opened this issue Aug 13, 2020 · 8 comments · Fixed by #1472
Labels
bug Something isn't working released This issue/pull request has been released.

Comments

@vincentbriglia
Copy link
Contributor

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/component@x.x.x

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

@vincentbriglia vincentbriglia added the bug Something isn't working label Aug 13, 2020
@hipstersmoothie
Copy link
Collaborator

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

@hipstersmoothie
Copy link
Collaborator

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?

@vincentbriglia
Copy link
Contributor Author

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

@alexpopaconst
Copy link

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)

@hipstersmoothie
Copy link
Collaborator

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.

@hipstersmoothie
Copy link
Collaborator

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

@hipstersmoothie
Copy link
Collaborator

Think this should be fixed now!

@adierkens
Copy link
Collaborator

🚀 Issue was released in v9.50.8 🚀

@adierkens adierkens added the released This issue/pull request has been released. label Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants