-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add ability to publish non-interactively without version bumping #5748
Conversation
This is nice but it looks like a breaking change to me. What do you think? Do you think anyone out there would be relying on this old behavior? |
Hi @BYK, I'm still relatively new to npm/yarn and I'm not too familiar with the its history so I'd appreciate it if someone with more experience can provide his/her input. At the very least, I think this fixes the behavior in which running |
In the interest of not changing the existing functionality, what do you think about putting this behind a flag like #5670 added? Something like
|
I'm not sure I understand exactly how the behavior changes from the old command line to the new one. Just to be sure I'm not making wrong assumptions, @peijiesim can you describe what are the affected command lines and how they change? |
@arcanis |
tl;dr: Merge it as is. This branch is what While I personally would have more closely followed the semantics of As for whether or not this should be considered a breaking change.... I personally think anyone's original hope for The only behavior of In other words... everyone successfully using In fact, I'm wondering if really any difference between But I digress... So, while the error (and possibly the exit code) would change if this branch was to be merged as is, I would further argue that the folks depending on the specific error condition caused by the lack of Thanks for making and maintaining yarn. I'm a fan... except when it comes time to publish. ✌️ |
@BYK ☝️ |
I'd hold on this change until the v2, since we've been talking about normalizing the command line options. |
@xentek thank you very much for the detailed response!
Non-interactive mode can also be triggered if the
This PR seems to be solving a pain point with minimal changes. Are you sure holding it back indefinitely until we come up with a good plan for the 2.0 CLI and then deliver on it? |
Ok, I see no reason to block it right now, let's merge it 🙂 |
We were using `github.event.release.tag_name` to set the new version of the package, but the tag_name in question contains a leading 'v' (`v4.0.0` for example) which breaks the workflow (invalid semver version, it expects `4.0.0` instead). Since we are currently bumping the version manually anyway, we can just call yarn publish with the `--non-interactive` flag, which will set the version to the current version defined in package.json (see yarnpkg/yarn#5748). That's exactly what we want in this context.
Summary
This PR is in reference to #5623. It adds a new feature to make it possible to publish non-interactively without specifying a new version. The current version in
package.json
will be used if no new version is specified.Test plan