@ariestools/toolchain 8.7.6 → 8.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12684,12 +12684,14 @@ function syncMonolithLayout(packageDir, config, options = {}) {
12684
12684
  const problems = [];
12685
12685
  const writeOrCheck = (filePath, content) => {
12686
12686
  const normalized = content.endsWith("\n") ? content : `${content}\n`;
12687
+ const exists = fs.existsSync(filePath);
12688
+ if (exists && fs.readFileSync(filePath, "utf8") === normalized) return;
12687
12689
  if (check) {
12688
- if (!fs.existsSync(filePath)) {
12690
+ if (!exists) {
12689
12691
  problems.push(`missing generated file: ${PATH.relative(packageDir, filePath)}`);
12690
12692
  return;
12691
12693
  }
12692
- if (fs.readFileSync(filePath, "utf8") !== normalized) problems.push(`out of date: ${PATH.relative(packageDir, filePath)}`);
12694
+ problems.push(`out of date: ${PATH.relative(packageDir, filePath)}`);
12693
12695
  return;
12694
12696
  }
12695
12697
  fs.mkdirSync(PATH.dirname(filePath), { recursive: true });