Skip to content

Commit 0fab4e6

Browse files
committed
fix(changelog): no whitespace when no addition/removal
1 parent 6ef3251 commit 0fab4e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/changelog.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,10 @@ export function generate(): string {
146146
others,
147147
} = diffTypes(previous, current);
148148

149-
const outputs = [writeAddedRemoved(added, removed)];
149+
const outputs = [];
150+
if (added.size || removed.size) {
151+
outputs.push(writeAddedRemoved(added, removed));
152+
}
150153
if (modified.size) {
151154
const modifiedOutput = [`## Modified\n`];
152155
for (const [key, value] of modified.entries()) {

0 commit comments

Comments
 (0)