Skip to content
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

chore(cli): don't ask questions during publish when --non-interactive is specified (#5002) #5108

Merged
merged 2 commits into from
Feb 17, 2018

Conversation

iansu
Copy link
Contributor

@iansu iansu commented Dec 19, 2017

Summary

Running publish with --non-interactive should not prompt for input and should fail if required args like --new-version are not provided.

Fixes #5002

Test plan

  • Run yarn publish --non-interactive and see error message about not providing --new-version
  • Delete NPM token, run yarn publish --non-interactive --new-version=1.0.1 and see error message about not being able to ask for login due to --non-interactive flag

@buildsize
Copy link

buildsize bot commented Dec 19, 2017

This change will increase the build size from 10.39 MB to 10.4 MB, an increase of 2.03 KB (0%)

File name Previous Size New Size Change
yarn-[version].noarch.rpm 900.2 KB 900.41 KB 220 bytes (0%)
yarn-[version].js 3.91 MB 3.92 MB 754 bytes (0%)
yarn-legacy-[version].js 4.06 MB 4.06 MB 831 bytes (0%)
yarn-v[version].tar.gz 905.32 KB 905.51 KB 195 bytes (0%)
yarn_[version]all.deb 669.15 KB 669.22 KB 74 bytes (0%)

@gandazgul
Copy link
Contributor

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.

@castarco
Copy link

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 git bisect search.

@bestander
Copy link
Member

Thanks, @iansu, very much appreciated!

@bestander bestander merged commit 0f713c1 into yarnpkg:master Feb 17, 2018
@bestander
Copy link
Member

@castarco, we squash commits when merge, so it should not be a problem

@bestander
Copy link
Member

@gandazgul, I think there is a separate issue open for your point.
I actually would like to have an ability to bump version and publish as separate commands

@adamscybot
Copy link

adamscybot commented Apr 5, 2018

@iansu I think this has caused a regression.

should fail if required args like --new-version are not provided.

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.

@adamscybot
Copy link

adamscybot commented Apr 5, 2018

Scratch that, looks like I confused some similar sounding issues. Looks like it has never been possible to skip version bump.

@rafambbr
Copy link

yarn publish --registry=http://mynexus:8081/repository/yarn-repo/ --access public --non-interactive --new-version 0.0.4

@janosh
Copy link

janosh commented Jul 23, 2021

There should be a non-interactive mode that doesn't require passing in a new version. What if the version was already bumped beforehand?

@merceyz
Copy link
Member

merceyz commented Jul 25, 2021

Create a new issue, please don't bump a three year old PR

@yarnpkg yarnpkg locked as resolved and limited conversation to collaborators Jul 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

yarn publish --non-interactive still asks questions
8 participants