node/test/doctool
Fabien Michel 124c2b32d9
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: https://github.com/nodejs/node/issues/45670

Co-authored-by: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/45728
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2023-01-01 10:44:47 +00:00
..
test-apilinks.mjs test: add lint rule to enforce trailing commas 2022-11-21 15:16:25 -05:00
test-deprecation-codes.js test: add lint rule to enforce trailing commas 2022-11-21 15:16:25 -05:00
test-doctool-html.mjs tools: fix incorrect version history order 2023-01-01 10:44:47 +00:00
test-doctool-json.mjs test: add lint rule to enforce trailing commas 2022-11-21 15:16:25 -05:00
test-doctool-versions.mjs doc: update default branch name in test/** 2022-06-17 10:49:22 +02:00
test-local-md-file-reference-regex.mjs
test-make-doc.mjs test: add lint rule to enforce trailing commas 2022-11-21 15:16:25 -05:00
testcfg.py