aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/publish.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts/src/publish.ts')
-rw-r--r--packages/monorepo-scripts/src/publish.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index 30e5bd0e1..240158c77 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -77,7 +77,7 @@ const semverNameToIndex: { [semver: string]: number } = {
}
// Save updated CHANGELOG.json
- fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs));
+ fs.writeFileSync(changelogJSONPath, JSON.stringify(changelogs, null, 4));
await utils.prettifyAsync(changelogJSONPath, constants.monorepoRootPath);
utils.log(`${packageName}: Updated CHANGELOG.json`);
// Generate updated CHANGELOG.md
@@ -162,7 +162,7 @@ function getChangelogJSONOrCreateIfMissing(packageName: string, changelogPath: s
return changelogJSON;
} catch (err) {
// If none exists, create new, empty one.
- const emptyChangelogJSON = JSON.stringify([]);
+ const emptyChangelogJSON = JSON.stringify([], null, 4);
fs.writeFileSync(changelogPath, emptyChangelogJSON);
return emptyChangelogJSON;
}