Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
opts: {
extraBinPaths?: string[],
lockfileDir: string,
optional: boolean,
rawConfig: object,
rootNodeModulesDir: string,
sideEffectsCacheWrite: boolean,
storeController: StoreController,
unsafePerm: boolean,
warn: (message: string) => void,
}
) {
const depNode = depGraph[depPath]
try {
await linkBinsOfDependencies(depNode, depGraph, opts)
const hasSideEffects = await runPostinstallHooks({
depPath,
extraBinPaths: opts.extraBinPaths,
optional: depNode.optional,
pkgRoot: depNode.peripheralLocation,
prepare: depNode.prepare,
rawConfig: opts.rawConfig,
rootNodeModulesDir: opts.rootNodeModulesDir,
unsafePerm: opts.unsafePerm || false,
})
if (hasSideEffects && opts.sideEffectsCacheWrite) {
try {
await opts.storeController.upload(depNode.peripheralLocation, {
engine: ENGINE_NAME,
packageId: depNode.packageId,
})
} catch (err) {