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

Support field paths in the info command #2183

Merged
merged 4 commits into from
Dec 9, 2016
Merged

Support field paths in the info command #2183

merged 4 commits into from
Dec 9, 2016

Conversation

iredchuk
Copy link
Contributor

@iredchuk iredchuk commented Dec 7, 2016

yarn info should support field paths for the second argument (fields separated by the dot), like npm info does.

yarn info yarn dist-tags.latest
Should output
0.17.10

Also
yarn info
Should be equivalent to
yarn info .
i.e. output info on the local package.

* Also default to local package when second arg is not specified
* Fixes #2175
@wyze
Copy link
Member

wyze commented Dec 8, 2016

Could you add a test please?

@iredchuk
Copy link
Contributor Author

iredchuk commented Dec 8, 2016

@wyze Would be happy to add tests, but at the moment there's no tests for info command. So I will have to set them up, need to look into that. I would rather completely mock the response from registry, but it seems like other commands rather work with a real registry. What do you think?

@wyze
Copy link
Member

wyze commented Dec 8, 2016

I think for now it is okay to hit the real registry. I know the tests for outdated hits the real registry.

@iredchuk
Copy link
Contributor Author

iredchuk commented Dec 8, 2016

OK, I'll try + also test the existing cases. Test setups for commands look a bit complicated at the first look, so need to wrap my head around it.

@iredchuk
Copy link
Contributor Author

iredchuk commented Dec 8, 2016

@wyze Added tests

@wyze wyze merged commit d5da81e into yarnpkg:master Dec 9, 2016
@wyze
Copy link
Member

wyze commented Dec 9, 2016

Thanks @iredchuk!

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

Successfully merging this pull request may close these issues.

2 participants