aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/deps_versions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts/src/deps_versions.ts')
-rw-r--r--packages/monorepo-scripts/src/deps_versions.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/monorepo-scripts/src/deps_versions.ts b/packages/monorepo-scripts/src/deps_versions.ts
index 5c9a2d6ff..07292a160 100644
--- a/packages/monorepo-scripts/src/deps_versions.ts
+++ b/packages/monorepo-scripts/src/deps_versions.ts
@@ -5,6 +5,8 @@ import * as fs from 'fs';
import { sync as globSync } from 'glob';
import * as _ from 'lodash';
+import { utils } from './utils';
+
interface Dependencies {
[depName: string]: string;
}
@@ -17,10 +19,6 @@ interface VersionsByDependency {
const PACKAGE_JSON_GLOB = '../*/package.json';
-function log(...args: any[]) {
- console.log(...args); // tslint:disable-line:no-console
-}
-
function getDependencies(path: string): Dependencies {
const file = fs.readFileSync(path).toString();
const parsed = JSON.parse(file);
@@ -48,9 +46,9 @@ _.map(versionsByDependency, (versions: Versions, depName: string) => {
if (_.uniq(_.values(versions)).length === 1) {
delete versionsByDependency[depName];
} else {
- log(chalk.bold(depName));
+ utils.log(chalk.bold(depName));
_.map(versions, (version: string, packageName: string) => {
- log(`├── ${packageName} -> ${version}`);
+ utils.log(`├── ${packageName} -> ${version}`);
});
}
});