Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
actions.push(() => {
const depsToInstallInRoot = root.some(({ isSatisfied }) => !isSatisfied)
? root.map(({ dependency }) => dependency)
: [];
if (depsToInstallInRoot.length) {
tracker.info("hoist", "Installing hoisted dependencies into root");
}
const promise = npmInstall.dependencies(rootPkg, depsToInstallInRoot, this.npmConfig);
return pulseTillDone(promise)
.then(() =>
// Link binaries into dependent packages so npm scripts will
// have access to them.
pMapSeries(root, ({ name, dependents }) => {
const { bin } = this.hoistedPackageJson(name);
if (bin) {
return pMap(dependents, pkg => {
const src = this.hoistedDirectory(name);
return symlinkBinary(src, pkg);
});
}
})
actions.push(() => {
const dependencies = deps.map(({ dependency }) => dependency);
const promise = npmInstall.dependencies(leafNode.pkg, dependencies, leafNpmConfig);
return pulseTillDone(promise).then(() => {
tracker.verbose("installed leaf", leafNode.name);
tracker.completeWork(1);
});
});
}