diff options
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r-- | packages/monorepo-scripts/package.json | 64 | ||||
-rw-r--r-- | packages/monorepo-scripts/src/deps_versions.ts | 54 | ||||
-rw-r--r-- | packages/monorepo-scripts/tsconfig.json | 10 | ||||
-rw-r--r-- | packages/monorepo-scripts/tslint.json | 2 |
4 files changed, 65 insertions, 65 deletions
diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 31eaf6eca..2bf2aa796 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -1,34 +1,34 @@ { - "name": "@0xproject/monorepo-scripts", - "version": "0.1.6", - "private": true, - "description": "Helper scripts for the monorepo", - "scripts": { - "deps_versions": "node ./lib/deps_versions.js", - "lint": "tslint --project . 'src/**/*.ts'", - "clean": "shx rm -rf lib", - "build": "tsc" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x.js.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" - }, - "homepage": "https://github.com/0xProject/0x.js/packages/monorepo-scripts/README.md", - "devDependencies": { - "@0xproject/tslint-config": "^0.4.4", - "@types/glob": "^5.0.33", - "@types/node": "^8.0.53", - "shx": "^0.2.2", - "tslint": "5.8.0", - "typescript": "~2.6.1" - }, - "dependencies": { - "chalk": "^2.3.0", - "glob": "^7.1.2", - "lodash": "^4.17.4" - } + "name": "@0xproject/monorepo-scripts", + "version": "0.1.6", + "private": true, + "description": "Helper scripts for the monorepo", + "scripts": { + "deps_versions": "node ./lib/deps_versions.js", + "lint": "tslint --project . 'src/**/*.ts'", + "clean": "shx rm -rf lib", + "build": "tsc" + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x.js.git" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x.js/issues" + }, + "homepage": "https://github.com/0xProject/0x.js/packages/monorepo-scripts/README.md", + "devDependencies": { + "@0xproject/tslint-config": "^0.4.4", + "@types/glob": "^5.0.33", + "@types/node": "^8.0.53", + "shx": "^0.2.2", + "tslint": "5.8.0", + "typescript": "~2.6.1" + }, + "dependencies": { + "chalk": "^2.3.0", + "glob": "^7.1.2", + "lodash": "^4.17.4" + } } diff --git a/packages/monorepo-scripts/src/deps_versions.ts b/packages/monorepo-scripts/src/deps_versions.ts index 2c0aa6c54..5c9a2d6ff 100644 --- a/packages/monorepo-scripts/src/deps_versions.ts +++ b/packages/monorepo-scripts/src/deps_versions.ts @@ -6,51 +6,51 @@ import { sync as globSync } from 'glob'; import * as _ from 'lodash'; interface Dependencies { - [depName: string]: string; + [depName: string]: string; } interface Versions { - [packageName: string]: string; + [packageName: string]: string; } interface VersionsByDependency { - [depName: string]: Versions; + [depName: string]: Versions; } const PACKAGE_JSON_GLOB = '../*/package.json'; function log(...args: any[]) { - console.log(...args); // tslint:disable-line:no-console + console.log(...args); // tslint:disable-line:no-console } function getDependencies(path: string): Dependencies { - const file = fs.readFileSync(path).toString(); - const parsed = JSON.parse(file); - const dependencies = { - ...parsed.dependencies, - ...parsed.devDependencies, - }; - return dependencies; + const file = fs.readFileSync(path).toString(); + const parsed = JSON.parse(file); + const dependencies = { + ...parsed.dependencies, + ...parsed.devDependencies, + }; + return dependencies; } const files = globSync(PACKAGE_JSON_GLOB); const versionsByDependency: VersionsByDependency = {}; files.map(path => { - const [_1, packageName, _2] = path.split('/'); - const dependencies = getDependencies(path); - _.map(dependencies, (version: string, depName: string) => { - if (_.isUndefined(versionsByDependency[depName])) { - versionsByDependency[depName] = {}; - } - versionsByDependency[depName][packageName] = version; - }); + const [_1, packageName, _2] = path.split('/'); + const dependencies = getDependencies(path); + _.map(dependencies, (version: string, depName: string) => { + if (_.isUndefined(versionsByDependency[depName])) { + versionsByDependency[depName] = {}; + } + versionsByDependency[depName][packageName] = version; + }); }); _.map(versionsByDependency, (versions: Versions, depName: string) => { - if (_.uniq(_.values(versions)).length === 1) { - delete versionsByDependency[depName]; - } else { - log(chalk.bold(depName)); - _.map(versions, (version: string, packageName: string) => { - log(`├── ${packageName} -> ${version}`); - }); - } + if (_.uniq(_.values(versions)).length === 1) { + delete versionsByDependency[depName]; + } else { + log(chalk.bold(depName)); + _.map(versions, (version: string, packageName: string) => { + log(`├── ${packageName} -> ${version}`); + }); + } }); diff --git a/packages/monorepo-scripts/tsconfig.json b/packages/monorepo-scripts/tsconfig.json index ad674c2b0..c56d255d5 100644 --- a/packages/monorepo-scripts/tsconfig.json +++ b/packages/monorepo-scripts/tsconfig.json @@ -1,7 +1,7 @@ { - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib" - }, - "include": ["./src/**/*"] + "extends": "../../tsconfig", + "compilerOptions": { + "outDir": "lib" + }, + "include": ["./src/**/*"] } diff --git a/packages/monorepo-scripts/tslint.json b/packages/monorepo-scripts/tslint.json index e63054bfc..ffaefe83a 100644 --- a/packages/monorepo-scripts/tslint.json +++ b/packages/monorepo-scripts/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0xproject/tslint-config"] } |