How to use the just-task-logger.logger.warn function in just-task-logger

To help you get started, we’ve selected a few just-task-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 / just / packages / just-task / src / cache.ts View on Github external
const cachePath = getCachePath();
  const cacheFile = path.join(cachePath, CacheFileName);

  if (!fs.existsSync(cacheFile)) {
    return false;
  }

  let shouldCache = false;

  try {
    const cachedHash = JSON.parse(fs.readFileSync(path.join(cachePath, CacheFileName)).toString());

    // TODO: make a more robust comparison
    shouldCache = JSON.stringify(currentHash) === JSON.stringify(cachedHash);
  } catch (e) {
    logger.warn('Invalid package-deps.json detected');
  }

  return shouldCache;
}

just-task-logger

Logger for Just scripts and tasks

MIT
Latest version published 1 year ago

Package Health Score

73 / 100
Full package analysis

Similar packages