chore(cli): don't ask questions during publish when --non-interactive is specified (#5002) - #5108
Conversation
|
This change will increase the build size from 10.39 MB to 10.4 MB, an increase of 2.03 KB (0%)
|
|
What if instead of requiring --new-version it publishes as is? I'm still using npm publish because I can't use yarn publish from CI. |
|
Maybe the branch of this PR should be rebased to avoid having a broken commit. Having broken commits is a problem when someone tries to do a |
|
Thanks, @iansu, very much appreciated! |
|
@castarco, we squash commits when merge, so it should not be a problem |
|
@gandazgul, I think there is a separate issue open for your point. |
|
@iansu I think this has caused a regression.
In previous versions, version is not a required field. See this PR #3103 and the related issue it fixed which enabled --new-version to not be specified #3011. This functionality allows people who are doing things like publishing from shell scripts or CI to use yarn to publish. |
|
Scratch that, looks like I confused some similar sounding issues. Looks like it has never been possible to skip version bump. |
|
yarn publish --registry=http://mynexus:8081/repository/yarn-repo/ --access public --non-interactive --new-version 0.0.4 |
|
There should be a non-interactive mode that doesn't require passing in a new version. What if the version was already bumped beforehand? |
|
Create a new issue, please don't bump a three year old PR |
Summary
Running
publishwith--non-interactiveshould not prompt for input and should fail if required args like--new-versionare not provided.Fixes #5002
Test plan
yarn publish --non-interactiveand see error message about not providing--new-versionyarn publish --non-interactive --new-version=1.0.1and see error message about not being able to ask for login due to--non-interactiveflag