tools: fix incorrect version history order · nodejs/node@124c2b3 · GitHub
Skip to content

Commit 124c2b3

Browse files
welfozlpinca
authored andcommitted
tools: fix incorrect version history order
This fixes an error in parseYAML(text), the version sorting coudn't be right as we compared an arrify string (ie. a = ["v18.11, v16.7.0"]) with an array of strings (ie. b = ["v18.07", "v16.7.0"]) in versionSort(a, b). minVersion(a) couldn't find the minimum version with an arrify string like a = ["v18.11, v16.7.0"]. That's why incorrect version history orders sometimes appeared. Furthermore, no need to sort the added version as it always comes first. So, it can be the last one to be pushed in the meta.changes array. Fixes: #45670 Co-authored-by: Luigi Pinca <luigipinca@gmail.com> PR-URL: #45728 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 27cf389 commit 124c2b3

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

test/doctool/test-doctool-html.mjs

Lines changed: 3 additions & 2 deletions

tools/doc/html.mjs

Lines changed: 7 additions & 7 deletions

0 commit comments

Comments
 (0)