Skip to content

Commit

Permalink
Merge pull request desktop#5 from desktop/prettify-json
Browse files Browse the repository at this point in the history
prettify the generated JSON
  • Loading branch information
joshaber authored Jan 9, 2018
2 parents 5583e5c + 69071e7 commit e964b42
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
"devDependencies": {
"@types/node": "^9.3.0",
"typescript": "^2.6.2"
},
"dependencies": {
"json-pretty": "0.0.1"
}
}
4 changes: 3 additions & 1 deletion src/run.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { spawn } from "./spawn";
import { fetchPR, IAPIPR } from "./api";

const jsonStringify: (obj: any) => string = require('json-pretty');

const PlaceholderChangeType = "???";
const OfficialOwner = "desktop";

Expand Down Expand Up @@ -104,5 +106,5 @@ export async function run(args: ReadonlyArray<string>): Promise<void> {
const previousVersion = args[0];
const lines = await getLogLines(previousVersion);
const changelogEntries = await getChangelogEntries(lines);
console.log(JSON.stringify(changelogEntries));
console.log(jsonStringify(changelogEntries));
}

0 comments on commit e964b42

Please sign in to comment.