diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-04-05 19:52:43 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-05 19:52:43 +0800 |
commit | 7f7ddee0f95f3ed3e903c230088dbee4648771bd (patch) | |
tree | cbaae6089347793d7b205d696d517cf2e1de38ab /packages/monorepo-scripts | |
parent | 674e56cea69fe96ddd0071d3c4c5b5ea8ae299bf (diff) | |
parent | b99c797945dacae09be1e1e2d58f806423fedffa (diff) | |
download | dexon-sol-tools-7f7ddee0f95f3ed3e903c230088dbee4648771bd.tar dexon-sol-tools-7f7ddee0f95f3ed3e903c230088dbee4648771bd.tar.gz dexon-sol-tools-7f7ddee0f95f3ed3e903c230088dbee4648771bd.tar.bz2 dexon-sol-tools-7f7ddee0f95f3ed3e903c230088dbee4648771bd.tar.lz dexon-sol-tools-7f7ddee0f95f3ed3e903c230088dbee4648771bd.tar.xz dexon-sol-tools-7f7ddee0f95f3ed3e903c230088dbee4648771bd.tar.zst dexon-sol-tools-7f7ddee0f95f3ed3e903c230088dbee4648771bd.zip |
Merge pull request #501 from 0xProject/feature/provider-over-wrapper
Use Provider over web3Wrapper
Diffstat (limited to 'packages/monorepo-scripts')
-rw-r--r-- | packages/monorepo-scripts/src/find_unused_dependencies.ts | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/packages/monorepo-scripts/src/find_unused_dependencies.ts b/packages/monorepo-scripts/src/find_unused_dependencies.ts index 374cba2e3..bfc38044c 100644 --- a/packages/monorepo-scripts/src/find_unused_dependencies.ts +++ b/packages/monorepo-scripts/src/find_unused_dependencies.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import * as depcheck from 'depcheck'; +import * as depcheckAsync from 'depcheck'; import * as fs from 'fs'; import lernaGetPackages = require('lerna-get-packages'); import * as _ from 'lodash'; @@ -23,9 +23,9 @@ const IGNORE_PACKAGES = ['@0xproject/deployer']; utils.log(`Checking ${lernaPackage.package.name} for unused deps. This might take a while...`); const configs = {}; - const result = await depcheckAsync(lernaPackage.location, configs); - if (!_.isEmpty(result.dependencies)) { - _.each(result.dependencies, dep => { + const { dependencies } = await depcheckAsync(lernaPackage.location, configs); + if (!_.isEmpty(dependencies)) { + _.each(dependencies, dep => { utils.log(dep); }); } @@ -35,11 +35,3 @@ const IGNORE_PACKAGES = ['@0xproject/deployer']; utils.log(err); process.exit(1); }); - -async function depcheckAsync(path: string, opts: any): Promise<depcheck.Results> { - return new Promise<depcheck.Results>((resolve, reject) => { - depcheck(path, opts, (unused: any) => { - resolve(unused); - }); - }); -} |