Skip to content

Commit

Permalink
doc: use module names in stability overview table
Browse files Browse the repository at this point in the history
PR-URL: #45312
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
panva authored and danielleadams committed Dec 28, 2022
1 parent fb69abf commit fd1fc58
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/doc/stability.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,23 @@ function collectStability(data) {

stability.push({
api: mod.name,
displayName: mod.textRaw,
link: link,
stability: mod.stability,
stabilityText: `(${mod.stability}) ${mod.stabilityText}`,
});
}
}

stability.sort((a, b) => a.api.localeCompare(b.api));
stability.sort((a, b) => a.displayName.localeCompare(b.displayName));
return stability;
}

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');
Expand Down

0 comments on commit fd1fc58

Please sign in to comment.