Skip to content

Commit 6abf5cd

Browse files
authored
chore: update script (#326)
* chore: reamdefix * chore: readme * changeset * changeset * chore: update script
1 parent da6fbaf commit 6abf5cd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

scripts/update-root-changelog.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ const shouldWrite = args.has('--write');
1111
try {
1212
await access(changesetDir);
1313
} catch {
14+
console.error('No .changeset directory found.');
1415
process.exit(0);
1516
}
1617

@@ -19,6 +20,7 @@ const changesetFiles = (await readdir(changesetDir))
1920
.sort();
2021

2122
if (changesetFiles.length === 0) {
23+
console.error('No changeset files found.');
2224
process.exit(0);
2325
}
2426

@@ -55,6 +57,7 @@ const parsed = await Promise.all(changesetFiles.map(parseChangeset));
5557
const packageBumps = parsed.flatMap((entry) => entry.packages);
5658

5759
if (packageBumps.length === 0) {
60+
console.error('No package bumps found.');
5861
process.exit(0);
5962
}
6063

@@ -108,6 +111,7 @@ try {
108111
existing = await readFile(changelogPath, 'utf8');
109112
} catch {
110113
await writeFile(changelogPath, `${header}${section}`, 'utf8');
114+
console.error('No existing changelog found. A new one has been created.');
111115
process.exit(0);
112116
}
113117

0 commit comments

Comments
 (0)