@ariestools/toolchain 8.7.5 → 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.
@@ -12756,12 +12756,14 @@ function syncMonolithLayout(packageDir, config, options = {}) {
12756
12756
  const problems = [];
12757
12757
  const writeOrCheck = (filePath, content) => {
12758
12758
  const normalized = content.endsWith("\n") ? content : `${content}\n`;
12759
+ const exists = fs.existsSync(filePath);
12760
+ if (exists && fs.readFileSync(filePath, "utf8") === normalized) return;
12759
12761
  if (check) {
12760
- if (!fs.existsSync(filePath)) {
12762
+ if (!exists) {
12761
12763
  problems.push(`missing generated file: ${PATH.relative(packageDir, filePath)}`);
12762
12764
  return;
12763
12765
  }
12764
- if (fs.readFileSync(filePath, "utf8") !== normalized) problems.push(`out of date: ${PATH.relative(packageDir, filePath)}`);
12766
+ problems.push(`out of date: ${PATH.relative(packageDir, filePath)}`);
12765
12767
  return;
12766
12768
  }
12767
12769
  fs.mkdirSync(PATH.dirname(filePath), { recursive: true });