Replies: 1 comment 1 reply
-
I don't have an answer as to why it does it the way it does it, but maybe just to get you going, you could use a fixed a version in your command (but I guess that would only work if you wanted all your packages are at the same version, basically won't be good for lerna version 1.99.1-beta.5 --dist-tag beta If that doesn't help, at least I tried 😉 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I recently encountered an issue with merging prereleases and wondered if the current behaviour is intended, and if so, how I can achieve the behaviour I'm expecting.
Consider the following scenario:
A project with a package
package-a
with release version1.99.0
. Subsequent tasks are patches.The
beta
branch is being developed and regularly versioned as prereleases. It has the following versions:package-a@1.99.1-beta.0
package-a@1.99.1-beta.1
package-a@1.99.1-beta.2
package-a@1.99.1-beta.3
package-a@1.99.1-beta.4
Using command
lerna version --conventional-commits --conventional-prerelease --preid="beta"
A subtask of the
beta
branch is being developed on thealpha
branch based onpackage-a@1.99.1-beta.4
which is also versioned as prereleases. It has the following versions:package-a@1.99.1-alpha.0
package-a@1.99.1-alpha.1
package-a@1.99.1-alpha.2
Using command
lerna version --conventional-commits --conventional-prerelease --preid="alpha"
Work on the
alpha
branch has been completed and merged into thebeta
branch and here is where the version conflict occurs.After the merge, the
beta
branch is versioned with the same command as usual (lerna version --conventional-commits --conventional-prerelease --preid="beta"
).The expected behaviour is that it will continue where the beta prerelease versions left off (i.e.,
package-a@1.99.1-beta.5
).The actual behaviour is that the numeric identifier goes back to zero (i.e.,
package-a@1.99.1-beta.0
) and it throws an error since the tagpackage-a@1.99.1-beta.0
already exists.Question 1: Is this the intended behaviour for this particular flow?
Question 2: Is there a version option that I can use so that the prerelease versions always continue from the numeric identifier if it exists?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions