Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function closeWatcher() {
// Wait for one second before closing, giving time for file changes to propagate
await delay(1000);
if (changedFilesOutsideScope.length > 0) {
logger.warn(sideEffectWarningString);
changedFilesOutsideScope.forEach(file => logger.warn(`- ${file}`));
logger.warn(sideEffectCallToActionString);
} else {
logger.info(noSideEffectString);
}
watcher.close();
}
export async function closeWatcher() {
// Wait for one second before closing, giving time for file changes to propagate
await delay(1000);
if (changedFilesOutsideScope.length > 0) {
logger.warn(sideEffectWarningString);
changedFilesOutsideScope.forEach(file => logger.warn(`- ${file}`));
logger.warn(sideEffectCallToActionString);
} else {
logger.info(noSideEffectString);
}
watcher.close();
}
private async createFallbackPackageHash(
dependencyPath: string,
dependency: string
) {
if (this.isInternalPackage(dependencyPath)) {
logger.warn(
`"${dependency}" does not have a pre-calculated hash. Will try to create a hash using package name and version as fallback.`
);
}
const packageJson = require(path.join(dependencyPath, "package.json"));
if (!packageJson || !packageJson.name || !packageJson.version) {
return;
}
return createHash(`${packageJson.name}@${packageJson.version}`);
}
changedFilesOutsideScope.forEach(file => logger.warn(`- ${file}`));
logger.warn(sideEffectCallToActionString);