diff options
Diffstat (limited to 'packages/monorepo-scripts/src/deps_versions.ts')
-rw-r--r-- | packages/monorepo-scripts/src/deps_versions.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/packages/monorepo-scripts/src/deps_versions.ts b/packages/monorepo-scripts/src/deps_versions.ts index 1053906b7..d15bb6b4d 100644 --- a/packages/monorepo-scripts/src/deps_versions.ts +++ b/packages/monorepo-scripts/src/deps_versions.ts @@ -1,7 +1,7 @@ #!/usr/bin/env node +import { PackageJSON } from '@0x/types'; import chalk from 'chalk'; -import * as fs from 'fs'; import { sync as globSync } from 'glob'; import * as _ from 'lodash'; @@ -21,11 +21,10 @@ const PACKAGE_JSON_GLOB = '../*/package.json'; // tslint:disable:no-unused-variable function getDependencies(path: string): Dependencies { - const file = fs.readFileSync(path).toString(); - const parsed = JSON.parse(file); + const packageJSON = utils.readJSONFile<PackageJSON>(path); const dependencies = { - ...parsed.dependencies, - ...parsed.devDependencies, + ...packageJSON.dependencies, + ...packageJSON.devDependencies, }; return dependencies; } |