Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (startingCyclicSubtree) {
// If we are starting a new subtree, then newLocalPackage will be its root
// NOTE: cyclicSubtreeRoot is guaranteed to be undefined here, since we never start
// a new tree inside an existing tree
newCyclicSubtreeRoot = newLocalPackage;
}
resolution.parentForCreate.addChild(newLocalPackage);
queue.push({
commonPackage: commonDependencyPackage,
localPackage: newLocalPackage,
cyclicSubtreeRoot: newCyclicSubtreeRoot
});
}
} else {
if (dependency.kind !== PackageDependencyKind.Optional) {
throw Error(`The dependency "${dependency.name}" needed by "${localPackage.name}"`
+ ` was not found the ${rushConfiguration.commonFolderName} folder -- do you need to run "rush generate"?`);
} else {
console.log(colors.yellow('Skipping optional dependency: ' + dependency.name));
}
}
}
}
// When debugging, you can uncomment this line to dump the data structure
// to the console:
// localProjectPackage.printTree();
createSymlinksForTopLevelProject(localProjectPackage);
// Also symlink the ".bin" folder