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
NEW: Implement full JSON output, without changing existing logic #76
NEW: Implement full JSON output, without changing existing logic #76
Conversation
@ahmadawais Hello, just a friendly reminder to review this :) Thank you! |
|
||
(async () => { | ||
// Init. | ||
await init(minimal); | ||
init(minimal || json); |
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.
await
is needed so the update check will run before the spinner.
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.
Looks good to me! ✔︎
🔗 https://github.com/ahmadawais/corona-cli/releases/tag/5.1.0 Thanks a lot @mifkata for working on this. One improvement I can think of is that the keys for JSON could be
|
Do you want me to open a PR for it @ahmadawais ? :) |
Sure thing.
… |
issue #11
Overview
This PR is about changing the output format from
Table
toJsonOutput
(a simplified Json formatter). It doesn't change anything about current logic in regards to data fetching and sorting. The only difference is that:corona --json > output.json
comma-number
, but instead return plain integerscli.flags.json === true
all coloring functions inutils/table.js
will return plain text insteadHow to test
corona --json
- normal runcorona -j
- same as above using short-handlecorona --json > output.json
- output tooutput.json
and check the formatting (Prettifying JSON helps)