From d4b554da1b45e6680e4b6ea6bdf6875c2f60d109 Mon Sep 17 00:00:00 2001 From: myarmolinsky Date: Wed, 23 Oct 2024 09:27:52 -0400 Subject: [PATCH] Docs: Show whether an alias is deprecated Change-type: patch --- automation/capitanodoc/markdown.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/automation/capitanodoc/markdown.ts b/automation/capitanodoc/markdown.ts index 4edf72b7..4bd32bcd 100644 --- a/automation/capitanodoc/markdown.ts +++ b/automation/capitanodoc/markdown.ts @@ -25,7 +25,14 @@ function renderOclifCommand(command: Category['commands'][0]): string[] { const result = [`## ${ent.encode(command.name || '')}`]; if (command.aliases?.length) { result.push('### Aliases'); - result.push(command.aliases.map((alias) => `- \`${alias}\``).join('\n')); + result.push( + command.aliases + .map( + (alias) => + `- \`${alias}\`${command.deprecateAliases ? ' *(deprecated)*' : ''}`, + ) + .join('\n'), + ); result.push( `\nTo use one of the aliases, replace \`${command.name}\` with the alias.`, );