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
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.
This was raised many times, see this discussion https://github.com/yarnpkg/yarn/pull/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 https://github.com/yarnpkg/yarn/pull/3395 yarn won't create an empty lockfile in the folder where it was run.
And by default Yarn outputs its version
I think this can be closed, @BYK up to you
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
Not a decision, more like a status quo.
I like node/npm -v myself but unix fanboys don't.
On 5 July 2017 at 13:50, Jeroen Akkerman notifications@github.com wrote:
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—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/yarnpkg/yarn/issues/3818#issuecomment-313223005, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACBdWFG9P4vDhmIKNubUX5hLd9YQg727ks5sK_cugaJpZM4ONLIa
.
I actually like this suggestion: https://github.com/yarnpkg/yarn/pull/3395#issuecomment-303689186
@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?
Sounds good.
As long as you deal with yarn install -v and don't make forward/backward breaking changes I don't have an opinion :)
@BYK @kaylieEB Looks like this is ready to close a la #3913
Thanks!