Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
options.dependencyLockfile?.deprecated &&
!pkgResponse.body.updated && !pkg.deprecated
) {
pkg.deprecated = options.dependencyLockfile.deprecated
}
hasBin = Boolean(pkg.bin && !R.isEmpty(pkg.bin) || pkg.directories?.bin)
// tslint:enable:no-string-literal
}
if (!pkg.name) { // TODO: don't fail on optional dependencies
throw new PnpmError('MISSING_PACKAGE_NAME', `Can't install ${wantedDependency.pref}: Missing package name`)
}
if (options.currentDepth === 0 && pkgResponse.body.latest && pkgResponse.body.latest !== pkg.version) {
ctx.outdatedDependencies[pkgResponse.body.id] = pkgResponse.body.latest
}
if (pkg.deprecated) {
deprecationLogger.debug({
deprecated: pkg.deprecated,
depth: options.currentDepth,
pkgId: pkgResponse.body.id,
pkgName: pkg.name,
pkgVersion: pkg.version,
prefix: ctx.prefix,
})
}
// using colon as it will never be used inside a package ID
const nodeId = createNodeId(options.parentNodeId, pkgResponse.body.id)
const currentIsInstallable = (
ctx.force ||
packageIsInstallable(pkgResponse.body.id, pkg, {
engineStrict: ctx.engineStrict,