From 7afce837f440b5b2a29ffeacc950b5dda657406d Mon Sep 17 00:00:00 2001 From: Fabien MICHEL Date: Sun, 4 Dec 2022 13:37:14 +0100 Subject: [PATCH] tools: fix added version is always the first one 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: https://github.com/nodejs/node/issues/45670 --- tools/doc/html.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/doc/html.mjs b/tools/doc/html.mjs index f436055ba77012..abff838b745db1 100644 --- a/tools/doc/html.mjs +++ b/tools/doc/html.mjs @@ -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 += '
History\n' + '\n\n';
VersionChanges