How to use the backfill-logger.logger.warn function in backfill-logger

To help you get started, we’ve selected a few backfill-logger examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / backfill / packages / backfill / src / audit.ts View on Github external
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();
}
github microsoft / backfill / packages / backfill / src / audit.ts View on Github external
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();
}
github microsoft / backfill / packages / backfill / src / hasher.ts View on Github external
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}`);
  }
github microsoft / backfill / packages / backfill / src / audit.ts View on Github external
    changedFilesOutsideScope.forEach(file => logger.warn(`- ${file}`));
    logger.warn(sideEffectCallToActionString);