diff --git a/scripts/generate-component-metadata.ts b/scripts/generate-component-metadata.ts index 4a858f33..da49afff 100644 --- a/scripts/generate-component-metadata.ts +++ b/scripts/generate-component-metadata.ts @@ -165,7 +165,11 @@ class MetadataGenerator { fs.mkdirSync(outputDir, { recursive: true }); } - fs.writeFileSync(this.outputPath, JSON.stringify(output, null, 2)); + // Trailing newline, deliberately: CI regenerates this file and fails the + // build when `git diff` is not empty. Without it every run reported the + // committed JSON as stale over the last byte alone — a red X on every + // commit that no content change could ever clear. + fs.writeFileSync(this.outputPath, `${JSON.stringify(output, null, 2)}\n`); console.log(`\nāœ… Generated metadata for ${components.length} components`); console.log(`šŸ“„ Output: ${this.outputPath}`); }