aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-17 18:59:02 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-07-17 18:59:02 +0800
commitbf8ac3b9e6ee59f267f7850418febfe84dedceb8 (patch)
tree0617e583892f9a8fe96a55dcac3a7f9af1ddae10 /packages/monorepo-scripts/src/utils
parentedcdc9b1b903158cc61529853d7e9028ecbc266a (diff)
downloaddexon-0x-contracts-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar
dexon-0x-contracts-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.gz
dexon-0x-contracts-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.bz2
dexon-0x-contracts-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.lz
dexon-0x-contracts-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.xz
dexon-0x-contracts-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.zst
dexon-0x-contracts-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.zip
Fix tslint issues
Diffstat (limited to 'packages/monorepo-scripts/src/utils')
-rw-r--r--packages/monorepo-scripts/src/utils/changelog_utils.ts8
-rw-r--r--packages/monorepo-scripts/src/utils/utils.ts6
2 files changed, 7 insertions, 7 deletions
diff --git a/packages/monorepo-scripts/src/utils/changelog_utils.ts b/packages/monorepo-scripts/src/utils/changelog_utils.ts
index dbafb6f16..4781b3b7d 100644
--- a/packages/monorepo-scripts/src/utils/changelog_utils.ts
+++ b/packages/monorepo-scripts/src/utils/changelog_utils.ts
@@ -10,7 +10,7 @@ import { Change, Changelog, VersionChangelog } from '../types';
const CHANGELOG_MD_HEADER = `
<!--
-This file is auto-generated using the monorepo-scripts package. Don't edit directly.
+changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
Edit the package's CHANGELOG.json file only.
-->
@@ -74,7 +74,7 @@ export const changelogUtils = {
},
getChangelogOrCreateIfMissing(packageName: string, packageLocation: string): Changelog {
const changelogJSONPath = path.join(packageLocation, 'CHANGELOG.json');
- let changelogJsonIfExists = this.getChangelogJSONIfExists(changelogJSONPath);
+ let changelogJsonIfExists = changelogUtils.getChangelogJSONIfExists(changelogJSONPath);
if (_.isUndefined(changelogJsonIfExists)) {
// If none exists, create new, empty one.
changelogJsonIfExists = '[]';
@@ -91,12 +91,12 @@ export const changelogUtils = {
async writeChangelogJsonFileAsync(packageLocation: string, changelog: Changelog): Promise<void> {
const changelogJSONPath = path.join(packageLocation, 'CHANGELOG.json');
fs.writeFileSync(changelogJSONPath, JSON.stringify(changelog, null, '\t'));
- await this.prettifyAsync(changelogJSONPath, constants.monorepoRootPath);
+ await changelogUtils.prettifyAsync(changelogJSONPath, constants.monorepoRootPath);
},
async writeChangelogMdFileAsync(packageLocation: string, changelogMdString: string): Promise<void> {
const changelogMarkdownPath = path.join(packageLocation, 'CHANGELOG.md');
fs.writeFileSync(changelogMarkdownPath, changelogMdString);
- await this.prettifyAsync(changelogMarkdownPath, constants.monorepoRootPath);
+ await changelogUtils.prettifyAsync(changelogMarkdownPath, constants.monorepoRootPath);
},
async prettifyAsync(filePath: string, cwd: string): Promise<void> {
await execAsync(`prettier --write ${filePath} --config .prettierrc`, {
diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts
index f819ab6f1..be3ad950f 100644
--- a/packages/monorepo-scripts/src/utils/utils.ts
+++ b/packages/monorepo-scripts/src/utils/utils.ts
@@ -13,7 +13,7 @@ export const utils = {
console.log(...args); // tslint:disable-line:no-console
},
async getUpdatedLernaPackagesAsync(shouldIncludePrivate: boolean): Promise<LernaPackage[]> {
- const updatedPublicPackages = await this.getLernaUpdatedPackagesAsync(shouldIncludePrivate);
+ const updatedPublicPackages = await utils.getLernaUpdatedPackagesAsync(shouldIncludePrivate);
const updatedPackageNames = _.map(updatedPublicPackages, pkg => pkg.name);
const allLernaPackages = lernaGetPackages(constants.monorepoRootPath);
@@ -110,7 +110,7 @@ export const utils = {
} catch (err) {
throw new Error(`Failed to delete local git tag. Got err: ${err}`);
}
- this.log(`Removed local tag: ${tagName}`);
+ utils.log(`Removed local tag: ${tagName}`);
},
async removeRemoteTagAsync(tagName: string): Promise<void> {
try {
@@ -120,6 +120,6 @@ export const utils = {
} catch (err) {
throw new Error(`Failed to delete remote git tag. Got err: ${err}`);
}
- this.log(`Removed remote tag: ${tagName}`);
+ utils.log(`Removed remote tag: ${tagName}`);
},
};