refactor: make 'generatedAt' optional in component metadata and remove timestamp generation to prevent CI drift

This commit is contained in:
David Montero Crespo 2026-04-21 17:35:13 -03:00
parent 07c9718bc3
commit 6ca0f91074
3 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,5 @@
{
"version": "1.0.0",
"generatedAt": "2026-04-21T18:09:56.254Z",
"components": [
{
"thumbnail": "<svg width=\"64\" height=\"64\" xmlns=\"http://www.w3.org/2000/svg\">\n <rect width=\"64\" height=\"64\" fill=\"#e0e0e0\" rx=\"4\"/>\n <text x=\"50%\" y=\"50%\" text-anchor=\"middle\" dy=\".3em\" font-size=\"10\" fill=\"#666\">\n DIODE-1N4007\n </text>\n </svg>",

View File

@ -45,6 +45,6 @@ export interface ComponentMetadata {
export interface ComponentMetadataCollection {
version: string;
generatedAt: string;
generatedAt?: string;
components: ComponentMetadata[];
}

View File

@ -144,9 +144,10 @@ class MetadataGenerator {
return a.name.localeCompare(b.name);
});
// Note: no `generatedAt` timestamp — it would change on every run and
// break the CI drift check (git diff --quiet on the committed JSON).
const output = {
version: '1.0.0',
generatedAt: new Date().toISOString(),
components,
};