diff options
author | Fabio Berger <me@fabioberger.com> | 2018-04-02 15:40:02 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-04-02 15:40:02 +0800 |
commit | 76c5945017c945122c3e72bc7dcdf5dd048b4a22 (patch) | |
tree | 5f822f722f852158b4124b9dfd02cd31dcc2ad64 /packages/monorepo-scripts | |
parent | 01c6fd92e8ebc93d333278a356a4a0fac26b58c2 (diff) | |
download | dexon-sol-tools-76c5945017c945122c3e72bc7dcdf5dd048b4a22.tar dexon-sol-tools-76c5945017c945122c3e72bc7dcdf5dd048b4a22.tar.gz dexon-sol-tools-76c5945017c945122c3e72bc7dcdf5dd048b4a22.tar.bz2 dexon-sol-tools-76c5945017c945122c3e72bc7dcdf5dd048b4a22.tar.lz dexon-sol-tools-76c5945017c945122c3e72bc7dcdf5dd048b4a22.tar.xz dexon-sol-tools-76c5945017c945122c3e72bc7dcdf5dd048b4a22.tar.zst dexon-sol-tools-76c5945017c945122c3e72bc7dcdf5dd048b4a22.zip |
Default to 4sp
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r-- | packages/monorepo-scripts/src/convert_changelogs.ts | 2 | ||||
-rw-r--r-- | packages/monorepo-scripts/src/publish.ts | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/monorepo-scripts/src/convert_changelogs.ts b/packages/monorepo-scripts/src/convert_changelogs.ts index 71383ee7c..c75abfc44 100644 --- a/packages/monorepo-scripts/src/convert_changelogs.ts +++ b/packages/monorepo-scripts/src/convert_changelogs.ts @@ -77,7 +77,7 @@ const HEADER_PRAGMA = '##'; changelog.changes.push(changes); } } - const changelogJSONPath = JSON.stringify(changelogs); + const changelogJSONPath = JSON.stringify(changelogs, null, 4); const changelogJSONPathPath = `${lernaPackage.location}/CHANGELOG.json`; fs.writeFileSync(changelogJSONPathPath, changelogJSONPath); await utils.prettifyAsync(changelogJSONPath, constants.monorepoRootPath); 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; } |