Skip to content

Lerna Publish pre-patch/minor/major behavior #936

Closed

Description

@mike-robertson

First I just want to say this is a great project! Thanks for putting it out there for folks to use!

Here's my question:
I don't know if there is a way to do this (not documented or I'm stupid) or if there isn't a way to do this, but if I publish a pre-patch/minor/major version, I would like a way for lerna publish to be able to figure out those packages still need a non-'pre' publish on subsequent lerna publish's.

Example:
I have a feature branch which has several packages being updated. I want to be able to deploy that branch to an environment and test against it before merging it into my master branch. Therefore, I need to (I think) do a lerna publish which will get all those affected components since my build process relies on pulling in the actual npm packages. However, I obviously don't want to do a full version bump since this feature is still in testing. So I use the pre-X publish option. This works great!

Then I decide to merge that branch into master after some testing is done. However, now when I run lerna publish, it fails to publish anything because in lerna's eyes, nothing has changed. I would still like to do an actual publish though on those packages that have a pre-X version number. Of course I can go through figure out which things changed and publish those packages manually, but in a project with a lot of packages, that can be pretty tedious.

Questions:

  1. Is there a way to do this currently?
  2. If there is, can that be documented in the readme (or if I just missed it, laugh at me and point me towards it)?
  3. If there is not a way to do that, is it on a roadmap as a feature, or would you entertain putting that as a possible feature? I think it would be very useful for this kind of workflow.

Thanks again for the great project!

Activity

  1. evocateur commented on Aug 23, 2017

    @evocateur
    Member

    I think you need to do a --canary release in the feature branch, so it avoids adding tags and thereby doesn't break the awareness of "changes since the last (non-canary) release" publish decisions. #960 should help, here.

  2. added a commit that references this issue on Jul 27, 2018
    8b97394
  3. added a commit that references this issue on Dec 18, 2018
    79dd10f
  4. lock commented on Dec 27, 2018

    @lock

    This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  5. locked as resolved and limited conversation to collaborators on Dec 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions