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

Docs page for yarn info #28

Merged
merged 1 commit into from
Oct 4, 2016
Merged

Docs page for yarn info #28

merged 1 commit into from
Oct 4, 2016

Conversation

jamesgpearce
Copy link
Contributor

May be over documented...

```

The default reporting style for this command is a single-quoted serialization.
To emit lines of valid JSON, use the standard `--json` flag:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait what? This should just be the raw JSON of the response from npm. It shouldn't be the JSON format of the Yarn logs.

@kittens

Copy link
Contributor Author

@jamesgpearce jamesgpearce Sep 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a user, my initial expectation was that --json gives an alternative rendering of the result, not the log of steps that got to produce it. If it it's supposed to be just an alternative representation of what happened in the terminal then I would have expected --log json or something.

Either way, people probably want a way to explicitly get a JSON output for this and other commands without grepping the log format. So if you can't re-appropriate --json, something like --output json.

(Not sure what I would expect if you set both flags though, so maybe --output json and --output jsonlog is a mutually exclusive alternative. Just bikeshedding here.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah moving the existing --json flag behind something more generic that could have multiple types like --reporter [json,pretty,etc] or --logs or --output and then using --json for commands like info that are querying information.

@jamiebuilds jamiebuilds mentioned this pull request Sep 28, 2016
46 tasks
@jamiebuilds jamiebuilds merged commit 7ef4e6f into yarnpkg:master Oct 4, 2016
@jamiebuilds jamiebuilds deleted the yarninfo branch October 4, 2016 18:18
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