Update sync-changelog.mjs

Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
Charles de Dreuille
2026-01-26 10:47:32 +00:00
parent 988b46ff13
commit 95c70b1285
+24
View File
@@ -897,6 +897,30 @@ async function main() {
console.log(` - ${comp}: ${count} ${count === 1 ? 'entry' : 'entries'}`);
});
// Warn about unknown components
const unknownComponents = [];
allEntries.forEach(entry => {
const fullText = entry.description;
const componentMatch = fullText.match(
/Affected components?:[ \t]*([^\n]+)/i,
);
if (componentMatch) {
const names = componentMatch[1].split(',').map(n => n.trim());
names.forEach(name => {
if (!mapComponentName(name, validComponents)) {
unknownComponents.push(name);
}
});
}
});
if (unknownComponents.length > 0) {
console.log('\n⚠️ Unknown components (skipped):');
[...new Set(unknownComponents)].forEach(name => {
console.log(` - ${name}`);
});
}
// Create changelogs directory if it doesn't exist
const changelogsDir = path.join(__dirname, '../src/utils/changelogs');
if (!fs.existsSync(changelogsDir) && !dryRun) {