From d2fc2aa666e5b39ba8d03e8291648d29feec1961 Mon Sep 17 00:00:00 2001 From: Filip Skokan Date: Sun, 6 Nov 2022 10:32:28 +0100 Subject: [PATCH] doc: use module names in stability overview table PR-URL: https://github.com/nodejs/node/pull/45312 Reviewed-By: Moshe Atlow Reviewed-By: Antoine du Hamel Reviewed-By: Daeyeon Jeong Reviewed-By: Luigi Pinca --- tools/doc/stability.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/doc/stability.mjs b/tools/doc/stability.mjs index 68d77cc4593ffa..479269df43925c 100644 --- a/tools/doc/stability.mjs +++ b/tools/doc/stability.mjs @@ -32,6 +32,7 @@ function collectStability(data) { stability.push({ api: mod.name, + displayName: mod.textRaw, link: link, stability: mod.stability, stabilityText: `(${mod.stability}) ${mod.stabilityText}`, @@ -39,7 +40,7 @@ function collectStability(data) { } } - stability.sort((a, b) => a.api.localeCompare(b.api)); + stability.sort((a, b) => a.displayName.localeCompare(b.displayName)); return stability; } @@ -47,7 +48,7 @@ function createMarkdownTable(data) { const md = ['| API | Stability |', '| --- | --------- |']; for (const mod of data) { - md.push(`| [${mod.api}](${mod.link}) | ${mod.stabilityText} |`); + md.push(`| [${mod.displayName}](${mod.link}) | ${mod.stabilityText} |`); } return md.join('\n');