-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 verbose option to version command #1307
Conversation
Lookin' good! I'd like to see Can you add a changelog entry and some tests? |
|
||
versions['npm'] = require('npm').version; | ||
|
||
for (module in versions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be for (var module in versions) {
(otherwise you are making a global variable and JSHint is not happy).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woops, will fix
ChangeLog entry no problem. Tests I'm not really sure what and how to test this thus I was asking :-) |
Of course I can squash the commits once the PR is ready |
Mind adding a quick test? |
I tried adding a test for this but I'm not sure I'm doing it right. Here's my effort: gavacho@6125691 |
Looking reasonable to me. Pulling it into my fork, so it shows up here and can be discussed 👍 |
Seems good. Can you squash into two commits (one for each author)? |
versions['npm'] = require('npm').version; | ||
|
||
for(var module in versions) { | ||
switch(module) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be able to remove this switch
in favor of something like https://gist.github.com/rjackson/df7c8f0a2b74ee668778.
Will need another rebase (changelog has a conflict from a recent PR merged). |
Looks like JSHint is not happy with the indentation of one of the |
Add verbose option to version command
Let me know if you want a test and how you would imagine the implementation.