@jpillora/take 0.12.0 → 0.12.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/take.mjs +4 -2
package/package.json
CHANGED
package/take.mjs
CHANGED
|
@@ -216,9 +216,11 @@ async function _writeInsertHelp(commands) {
|
|
|
216
216
|
continue;
|
|
217
217
|
const desc = cmd.description ? ` - ${cmd.description}` : "";
|
|
218
218
|
lines.push(`- \`${cmd.name}\`${desc}`);
|
|
219
|
-
// Add flags as sub-bullets
|
|
219
|
+
// Add flags as sub-bullets (sorted, matching the CLI --help output, so the
|
|
220
|
+
// generated markdown is deterministic regardless of flag insertion order)
|
|
220
221
|
const shorts = new Set();
|
|
221
|
-
for (const
|
|
222
|
+
for (const flag of namedFlags(cmd.flags)) {
|
|
223
|
+
const { name } = flag;
|
|
222
224
|
const letter = name[0];
|
|
223
225
|
const shortStr = shorts.has(letter) ? "" : ` \`-${letter}\``;
|
|
224
226
|
shorts.add(letter);
|