mirror of
https://github.com/pnpm/pnpm.git
synced 2026-03-24 18:11:39 -04:00
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 }
|
||||
}
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"sourceMap": true,
|
||||
"declaration": true,
|
||||
"noImplicitAny": true,
|
||||
"noImplicitReturns": false,
|
||||
"noImplicitReturns": true,
|
||||
"suppressImplicitAnyIndexErrors": true,
|
||||
"target": "es6",
|
||||
"outDir": "lib",
|
||||
|
||||
Reference in New Issue
Block a user