-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Feature] Canary should have incrementing version numbers. #277
Comments
Ah good point.. didn't really think of that at the time.. |
Canary is super useful btw. Also, it would be nice if I could select the next version. Right now it uses lerna.json which is the current version but I'd prefer to publish a canary for the next minor or patch release most of the time, so I have to manually edit lerna.json. |
Can we just follow the normal prompting for versions flow for canary? |
I just ran into this issue, where the "latest" version of a dep was chosen over the canary because the canary version was based on the last released version number not the "next" one. If you're automatically building a canary from CI you don't want the prompting flow, so as long as there's still a way to publish a canary with the "next" version number without interactivity then that'd work for my use case. |
Bumping this again. This is so broken it hurts. |
We should either use incrementing part in canary version before hash, or substitute exact version for controlled packages without caret in front. |
Can we please at least add a flag for using exact versions in published packages? It would even be useful for non-canary releases. |
Is there anything holding up a PR fixing these issues? I haven't looked at the Lerna codebase much but would be happy to make a PR a) supporting incrementing number releases and b) add support for specifying a next version. I'm using Lerna + canary releases to great effect with Gatsby and am planning on automating canary releases on build passes (anyone doing this btw?) and these two changes would make that much nicer. |
@KyleAMathews That'd be great. I hacked it in to my local build: https://github.com/tdreyno/lerna/commit/5f743ca6e347347d6ebf477017f6cebc992c99f7 |
Thanks @evocateur, I'll try it out! |
Same problem with |
Correct, v2.0.0-rc.1 does not properly increment canary versions yet. With annotated git tags, we have a much more useful |
Just broke Create React App beta releases with this 😢 |
For Gatsby I've been telling testers to just use "canary" for their package version. |
That doesn’t solve the issue with monorepos since two canaries that depend on each other without |
Oh right. Yeah very little of that in Gatsby so have avoided problems.
…On Thu, May 18, 2017, 12:55 PM Dan Abramov ***@***.***> wrote:
That doesn’t solve the issue with monorepos since two canaries that depend
on each other without exact flag will break as soon as the next hash is
higher on alphabetic order.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#277 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAEVh5JZUz3srZuRIte_N_eapQLiGhH_ks5r7COpgaJpZM4JLG1g>
.
|
I was hoping to get around to proper incrementing with better |
Somewhat related, as reported in #915: |
@evocateur I don't know the whole flow around the |
@alan-agius4 However, until we restore the |
I'm very interested in getting this to work as currently our desired CI release flow cannot be covered with lerna. However, after playing around a bit I noticed that both
According to https://semver.org/#spec-item-10 they definitely are valid semver versions.
|
The yarn registry is just a proxy for the npm registry, right? This sounds like a yarn client bug.
… On Feb 27, 2018, at 01:12, Pleun Vanderbauwhede ***@***.***> wrote:
I'm very interested in getting this to work as currently our desired CI release flow cannot be covered with lerna. However, after playing around a bit I noticed that both 1.0.4-alpha.0+deadbeef and 1.0.4-alpha.0+sha.deadbeef are currently not accepted by the yarn registry.
Command failed: yarn publish --new-version 2.0.1-build.1519722155+61bd02c2 --tag test
warning package.json: No license field
warning package.json: No license field
error An unexpected error occurred: ***@***.***%2fapp-2: New versions must be valid semver.".
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
BREAKING CHANGE: * `--preid` now defaults to "alpha" during prereleases: The previous default for this option was undefined, which led to an awkward "1.0.1-0" result when passed to `semver.inc()`. The new default "alpha" yields a much more useful "1.0.1-alpha.0" result. Any previous prerelease ID will be preserved, just as it was before. * `--no-verify` is no longer passed to `git commit` by default, but controlled by the new `--commit-hooks` option: The previous behavior was too overzealous, and the new option operates exactly like the corresponding [npm version](https://docs.npmjs.com/cli/version#commit-hooks) option of the same name. As long as your pre-commit hooks are properly scoped to ignore changes in package.json files, this change should not affect you. If that is not the case, you may pass `--no-commit-hooks` to restore the previous behavior. Fixes #277 Fixes #936 Fixes #956 Fixes #961 Fixes #1056 Fixes #1118 Fixes #1385 Fixes #1483 Fixes #1494
BREAKING CHANGE: * `--preid` now defaults to "alpha" during prereleases: The previous default for this option was undefined, which led to an awkward "1.0.1-0" result when passed to `semver.inc()`. The new default "alpha" yields a much more useful "1.0.1-alpha.0" result. Any previous prerelease ID will be preserved, just as it was before. * `--no-verify` is no longer passed to `git commit` by default, but controlled by the new `--commit-hooks` option: The previous behavior was too overzealous, and the new option operates exactly like the corresponding [npm version](https://docs.npmjs.com/cli/version#commit-hooks) option of the same name. As long as your pre-commit hooks are properly scoped to ignore changes in package.json files, this change should not affect you. If that is not the case, you may pass `--no-commit-hooks` to restore the previous behavior. Fixes lerna#277 Fixes lerna#936 Fixes lerna#956 Fixes lerna#961 Fixes lerna#1056 Fixes lerna#1118 Fixes lerna#1385 Fixes lerna#1483 Fixes lerna#1494
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. |
The canary feature is fantastic, however because it uses commit hashes instead of numbers, publishing a canary release with the same basic version number might require the wrong versions when using ^ for all the other package dependencies. Can we either overwrite the dependencies to require explicit canary versions OR properly version canaries so that newer canaries will always be installed over older ones? :)
The text was updated successfully, but these errors were encountered: