un-prettify json output, update docs

This commit is contained in:
silverwind 2018-10-25 22:36:41 +02:00
parent fd8af7bcdf
commit 16372cd6e6
Signed by: silverwind
GPG Key ID: 2E62B41C93869443
2 changed files with 3 additions and 3 deletions

@ -64,10 +64,10 @@ minimist ^1.0.0 ^1.2.0
```
### JSON Output
`updates` can output JSON. The result is always an object with the key `results` and depending on operation, `message` and `error` properties can also be present.
The JSON output is an option with possible properties `results`, `message` and `error`:
```console
$ updates -j
$ updates -j | jq
{
"results": {
"chalk": {

@ -208,7 +208,7 @@ function finish(obj, opts) {
if (!hadError) {
output.results = deps;
}
console.info(JSON.stringify(output, null, 2));
console.info(JSON.stringify(output));
} else {
if (Object.keys(deps).length && !hadError) {
console.info(formatDeps(deps));