diff --git a/package.json b/package.json index 5ff7e0d0..06132f0d 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@oclif/config": "^1.3.56", "@oclif/dev-cli": "^1.2.16", "@oclif/errors": "^1.0.2", - "@oclif/plugin-legacy": "^1.0.2", + "@oclif/plugin-legacy": "^1.0.4", "@oclif/plugin-plugins": "^1.0.1", "@oclif/test": "^1.0.1", "@oclif/tslint": "^1.0.2", diff --git a/src/index.ts b/src/index.ts index 273f56d9..e6698855 100644 --- a/src/index.ts +++ b/src/index.ts @@ -116,7 +116,8 @@ export default class Help { commands(commands: (Config.Command | Config.Topic)[]): string | undefined { if (!commands.length) return - commands = uniqBy(commands, c => id(c)) + commands = uniqBy(commands, id) + commands = sortBy(commands, id) let body = renderList(commands.map(c => [ id(c), c.description && this.render(c.description.split('\n')[0]) diff --git a/yarn.lock b/yarn.lock index 9cb9f1d8..ab412e9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32,7 +32,7 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" -"@oclif/command@^1.3.0", "@oclif/command@^1.3.1": +"@oclif/command@^1.3.1": version "1.3.1" resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.3.1.tgz#b2e063034f2fd39d89729bb2fe8f9cb070c4b4e1" dependencies: @@ -84,13 +84,13 @@ widest-line "^2.0.0" wrap-ansi "^3.0.1" -"@oclif/plugin-legacy@^1.0.2": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@oclif/plugin-legacy/-/plugin-legacy-1.0.2.tgz#b595edef2fd3411db9f3cc98205e72309116eed1" +"@oclif/plugin-legacy@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@oclif/plugin-legacy/-/plugin-legacy-1.0.4.tgz#dcd4845e230c39ae98ca07982ac848e8a54a7f5c" dependencies: "@heroku-cli/color" "^1.1.3" "@heroku-cli/command" "^8.0.0-oclif.2" - "@oclif/command" "^1.3.0" + "@oclif/command" "^1.3.1" ansi-escapes "^3.0.0" debug "^3.1.0" semver "^5.5.0"