diff --git a/src/get_save_type.ts b/src/get_save_type.ts index 25edefbf1b..8585ba1bcc 100644 --- a/src/get_save_type.ts +++ b/src/get_save_type.ts @@ -5,4 +5,5 @@ export default function getSaveType (opts: PublicInstallationOptions): Dependenc if (opts.save || opts.global) return 'dependencies' if (opts.saveDev) return 'devDependencies' if (opts.saveOptional) return 'optionalDependencies' + return null } diff --git a/src/install/link_bins.ts b/src/install/link_bins.ts index d4199000f5..e4aab47f6d 100644 --- a/src/install/link_bins.ts +++ b/src/install/link_bins.ts @@ -55,7 +55,7 @@ function isScopedPkgsDir (dirPath: string) { export function linkPkgBins (modules: string, target: string) { const pkg = tryRequire(path.join(target, 'package.json')) - if (!pkg || !pkg.bin) return + if (!pkg || !pkg.bin) return Promise.resolve() const bins = binify(pkg) const binDir = path.join(modules, '.bin') @@ -140,5 +140,5 @@ function cmdShim (proxyPath: string, targetPath: string) { */ function tryRequire (path: string) { - try { return requireJson(path) } catch (e) { } + try { return requireJson(path) } catch (e) { return null } } diff --git a/src/install/link_peers.ts b/src/install/link_peers.ts index 50c290893b..4f52d3a4eb 100644 --- a/src/install/link_peers.ts +++ b/src/install/link_peers.ts @@ -10,7 +10,7 @@ import {InstalledPackages} from '../api/install' */ export default function linkPeers (store: string, installs: InstalledPackages) { - if (!installs) return + if (!installs) return Promise.resolve() const peers = {} const roots = {} diff --git a/tsconfig.json b/tsconfig.json index 606587d602..d509dfdf2e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,7 @@ "sourceMap": true, "declaration": true, "noImplicitAny": true, - "noImplicitReturns": false, + "noImplicitReturns": true, "suppressImplicitAnyIndexErrors": true, "target": "es6", "outDir": "lib",