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

Return yarn version with yarn -v #3818

Closed
Ionaru opened this issue Jul 4, 2017 · 10 comments
Closed

Return yarn version with yarn -v #3818

Ionaru opened this issue Jul 4, 2017 · 10 comments

Comments

@Ionaru
Copy link

Ionaru commented Jul 4, 2017

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
yarn -v runs yarn install.
yarn -V returns version of yarn

What is the expected behavior?
yarn -v returns version of yarn
This would be in line with Node and NPM version outputs (node -v and npm -v respectively).

Please mention your node.js, yarn and operating system version.
Node 6.11.0
Yarn 0.27.5
Kubuntu 17.04

@BYK
Copy link
Member

BYK commented Jul 5, 2017

I think this makes a lot of sense. @bestander @arcanis @kittens objections?

I looked at the code and there doesn't seem to be anything that depends on a -v flag.

@bestander
Copy link
Member

This was raised many times, see this discussion #3395.

v/V is ambiguous and everyone has an opinion what should they mean depending on their background.

We ended up on agreeing that there should be no shorthands at all and use --verbose and --version.

At the same time install is a default command of yarn so yarn -v and yarn -V should run install disregarding what V/v means.
At least after #3395 yarn won't create an empty lockfile in the folder where it was run.
And by default Yarn outputs its version

@bestander
Copy link
Member

I think this can be closed, @BYK up to you

@Ionaru
Copy link
Author

Ionaru commented Jul 5, 2017

I'd disagree and argue Yarn should stay as close to the Node/NPM command style as possible, but it looks like the decision has been make. In my opinion -v is an essential shorthand command

@bestander
Copy link
Member

bestander commented Jul 5, 2017 via email

@BYK
Copy link
Member

BYK commented Jul 6, 2017

I actually like this suggestion: #3395 (comment)

@bestander @arcanis - I think being compatible with npm is important, especially for 1.0. If you consider that both node and npm supports the name -v calls I'd rather add support for that. We can also stop printing the version at the top for each invocation with this (/cc @cpojer).

Currently when you do npm command -v it still simply outputs the version which is quite useless if you ask me so I'm okay we use -v as --verbose if we are running a command.

Thoughts?

@cpojer
Copy link
Contributor

cpojer commented Jul 6, 2017

Sounds good.

@bestander
Copy link
Member

As long as you deal with yarn install -v and don't make forward/backward breaking changes I don't have an opinion :)

@olingern
Copy link
Contributor

olingern commented Sep 9, 2017

@BYK @kaylieEB Looks like this is ready to close a la #3913

@kaylie-alexa
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants