Skip to content

Commit

Permalink
tools: fix added version is always the first one
Browse files Browse the repository at this point in the history
There is no need to sort the addded version as it always comes first.
So, it can be the last one to be pushed in the meta.changes array.

Fixes: nodejs#45670
  • Loading branch information
welfoz committed Dec 4, 2022
1 parent 7b9432f commit 5e4afb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/doc/html.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -341,11 +341,11 @@ function parseYAML(text) {
}

if (meta.changes.length > 0) {
if (added.description) meta.changes.push(added);
if (deprecated.description) meta.changes.push(deprecated);
if (removed.description) meta.changes.push(removed);

meta.changes.sort((a, b) => versionSort(a.version, b.version));
if (added.description) meta.changes.push(added);

result += '<details class="changelog"><summary>History</summary>\n' +
'<table>\n<tr><th>Version</th><th>Changes</th></tr>\n';
Expand Down

0 comments on commit 5e4afb9

Please sign in to comment.