Skip to content

Commit

Permalink
fix sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
anbraten committed Jul 12, 2023
1 parent 9925ede commit 34e975b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function updateChangelogSection(
sections = sections.filter((s) => s.version !== nextVersion);
sections.push({ version: nextVersion, section: newSection });

sections = sections.sort((a, b) => semver.compare(a.version, b.version));
sections = sections.sort((a, b) => semver.compare(b.version, a.version));

return `# Changelog\n\n${sections.map((s) => s.section).join("\n\n")}`;
}

0 comments on commit 34e975b

Please sign in to comment.