From e8f1244c29c089f350526fec8a9bdd02d3a8b049 Mon Sep 17 00:00:00 2001 From: peternhale Date: Mon, 27 Sep 2021 12:41:34 -0600 Subject: [PATCH] fix: adjust help text to new style guide (#328) @W-9928119@ --- src/commands/plugins/index.ts | 6 ++--- src/commands/plugins/inspect.ts | 4 ++-- src/commands/plugins/install.ts | 6 ++--- src/commands/plugins/link.ts | 2 +- src/commands/plugins/uninstall.ts | 2 +- src/commands/plugins/update.ts | 2 +- test/commands/plugins/index.test.ts | 12 +++++----- yarn.lock | 36 ++++++++++------------------- 8 files changed, 29 insertions(+), 41 deletions(-) diff --git a/src/commands/plugins/index.ts b/src/commands/plugins/index.ts index 2f595eb5..898337df 100644 --- a/src/commands/plugins/index.ts +++ b/src/commands/plugins/index.ts @@ -7,10 +7,10 @@ import {sortBy} from '../../util' export default class PluginsIndex extends Command { static flags = { - core: Flags.boolean({description: 'show core plugins'}), + core: Flags.boolean({description: 'Show core plugins.'}), } - static description = 'list installed plugins' + static description = 'List installed plugins.' static examples = ['$ <%- config.bin %> plugins'] @@ -24,7 +24,7 @@ export default class PluginsIndex extends Command { plugins = plugins.filter(p => p.type !== 'core' && p.type !== 'dev') } if (plugins.length === 0) { - this.log('no plugins installed') + this.log('No plugins installed.') return } this.display(plugins as Plugin[]) diff --git a/src/commands/plugins/inspect.ts b/src/commands/plugins/inspect.ts index 3d101fe8..681de4f6 100644 --- a/src/commands/plugins/inspect.ts +++ b/src/commands/plugins/inspect.ts @@ -20,7 +20,7 @@ type Dependencies = { } export default class PluginsInspect extends Command { - static description = 'displays installation properties of a plugin'; + static description = 'Displays installation properties of a plugin.'; static usage = 'plugins:inspect PLUGIN...'; @@ -31,7 +31,7 @@ export default class PluginsInspect extends Command { static strict = false; static args = [ - {name: 'plugin', description: 'plugin to inspect', required: true, default: '.'}, + {name: 'plugin', description: 'Plugin to inspect.', required: true, default: '.'}, ]; static flags = { diff --git a/src/commands/plugins/install.ts b/src/commands/plugins/install.ts index e1e1594a..332fab3b 100644 --- a/src/commands/plugins/install.ts +++ b/src/commands/plugins/install.ts @@ -5,7 +5,7 @@ import cli from 'cli-ux' import Plugins from '../../plugins' export default class PluginsInstall extends Command { - static description = `installs a plugin into the CLI + static description = `Installs a plugin into the CLI. Can be installed from npm or a git url. Installation of a user-installed plugin will override a core plugin. @@ -24,7 +24,7 @@ e.g. If you have a core plugin that has a 'hello' command, installing a user-ins static strict = false; static args = [ - {name: 'plugin', description: 'plugin to install', required: true}, + {name: 'plugin', description: 'Plugin to install.', required: true}, ]; static flags = { @@ -32,7 +32,7 @@ e.g. If you have a core plugin that has a 'hello' command, installing a user-ins verbose: Flags.boolean({char: 'v'}), force: Flags.boolean({ char: 'f', - description: 'yarn install with force flag', + description: 'Run yarn install with force flag.', }), }; diff --git a/src/commands/plugins/link.ts b/src/commands/plugins/link.ts index 9a70cadc..a4cbadeb 100644 --- a/src/commands/plugins/link.ts +++ b/src/commands/plugins/link.ts @@ -5,7 +5,7 @@ import cli from 'cli-ux' import Plugins from '../../plugins' export default class PluginsLink extends Command { - static description = `links a plugin into the CLI for development + static description = `Links a plugin into the CLI for development. Installation of a linked plugin will override a user-installed or core plugin. e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello' command will override the user-installed or core plugin implementation. This is useful for development work. diff --git a/src/commands/plugins/uninstall.ts b/src/commands/plugins/uninstall.ts index 0bd0f0cf..3cf21a15 100644 --- a/src/commands/plugins/uninstall.ts +++ b/src/commands/plugins/uninstall.ts @@ -5,7 +5,7 @@ import cli from 'cli-ux' import Plugins from '../../plugins' export default class PluginsUninstall extends Command { - static description = 'removes a plugin from the CLI' + static description = 'Removes a plugin from the CLI.' static usage = 'plugins:uninstall PLUGIN...' diff --git a/src/commands/plugins/update.ts b/src/commands/plugins/update.ts index a5ccba3b..6bb4532b 100644 --- a/src/commands/plugins/update.ts +++ b/src/commands/plugins/update.ts @@ -7,7 +7,7 @@ export default class PluginsUpdate extends Command { static command = 'update' - static description = 'update installed plugins' + static description = 'Update installed plugins.' static flags = { help: Flags.help({char: 'h'}), diff --git a/test/commands/plugins/index.test.ts b/test/commands/plugins/index.test.ts index 602cab59..d82b0640 100644 --- a/test/commands/plugins/index.test.ts +++ b/test/commands/plugins/index.test.ts @@ -12,7 +12,7 @@ describe('command', () => { .command(['plugins:uninstall', '@heroku-cli/plugin-@oclif/example-plugin-ts']) .stdout() .command(['plugins'], {reset: true}) - .do(output => expect(output.stdout).to.equal('no plugins installed\n')) + .do(output => expect(output.stdout).to.equal('No plugins installed.\n')) .it('installs and uninstalls @oclif/example-plugin-ts') test @@ -23,7 +23,7 @@ describe('command', () => { .command(['plugins:uninstall', '@oclif/example-plugin-ts@latest'], {reset: true}) .stdout() .command(['plugins'], {reset: true}) - .do(output => expect(output.stdout).to.equal('no plugins installed\n')) + .do(output => expect(output.stdout).to.equal('No plugins installed.\n')) .it('installs and uninstalls @oclif/example-plugin-ts with tags') test @@ -37,7 +37,7 @@ describe('command', () => { .command(['plugins:uninstall', 'oclif-debug']) .stdout() .command(['plugins'], {reset: true}) - .do(output => expect(output.stdout).to.equal('no plugins installed\n')) + .do(output => expect(output.stdout).to.equal('No plugins installed.\n')) .it('installs via an alias') test @@ -51,7 +51,7 @@ describe('command', () => { .command(['plugins:uninstall', 'oclif-debug']) .stdout() .command(['plugins'], {reset: true}) - .do(output => expect(output.stdout).to.equal('no plugins installed\n')) + .do(output => expect(output.stdout).to.equal('No plugins installed.\n')) .it('installs and uninstalls jdxcode/oclif-debug') test @@ -59,7 +59,7 @@ describe('command', () => { .catch(/1/) .stdout() .command(['plugins'], {reset: true}) - .do(output => expect(output.stdout).to.equal('no plugins installed\n')) + .do(output => expect(output.stdout).to.equal('No plugins installed.\n')) .it('does not install if unsure if scoped package does not exist') // test // .command(['plugins:install', 'heroku-debug@beta'], {reset: true}) @@ -80,6 +80,6 @@ describe('command', () => { // .command(['plugins:uninstall', 'heroku-debug']) // .stdout() // .command(['plugins']) - // .do(output => expect(output.stdout).to.equal('no plugins installed\n')) + // .do(output => expect(output.stdout).to.equal('No plugins installed.\n')) // .it('installs and uninstalls heroku-debug') }) diff --git a/yarn.lock b/yarn.lock index dad08131..39566f1c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -241,7 +241,7 @@ supports-color "^5.4.0" tslib "^1" -"@oclif/command@^1.5.10", "@oclif/command@^1.5.12", "@oclif/command@^1.5.20", "@oclif/command@^1.6", "@oclif/command@^1.6.0", "@oclif/command@^1.8.0": +"@oclif/command@^1.5.10", "@oclif/command@^1.5.20", "@oclif/command@^1.6", "@oclif/command@^1.6.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@oclif/command/-/command-1.8.0.tgz#c1a499b10d26e9d1a611190a81005589accbb339" integrity sha512-5vwpq6kbvwkQwKqAoOU3L72GZ3Ta8RRrewKj9OJRolx28KLJJ8Dg9Rf7obRwt5jQA9bkYd8gqzMTrI7H3xLfaw== @@ -253,7 +253,7 @@ debug "^4.1.1" semver "^7.3.2" -"@oclif/config@^1.12.11", "@oclif/config@^1.12.6", "@oclif/config@^1.12.8", "@oclif/config@^1.15.1", "@oclif/config@^1.17.0": +"@oclif/config@^1.12.6", "@oclif/config@^1.12.8", "@oclif/config@^1.15.1": version "1.17.0" resolved "https://registry.yarnpkg.com/@oclif/config/-/config-1.17.0.tgz#ba8639118633102a7e481760c50054623d09fcab" integrity sha512-Lmfuf6ubjQ4ifC/9bz1fSCHc6F6E653oyaRXxg+lgT4+bYf9bk+nqrUpAbrXyABkCqgIBiFr3J4zR/kiFdE1PA== @@ -265,7 +265,7 @@ is-wsl "^2.1.1" tslib "^2.0.0" -"@oclif/core@^0.5.34": +"@oclif/core@^0.5.34", "@oclif/core@^0.5.39": version "0.5.39" resolved "https://registry.yarnpkg.com/@oclif/core/-/core-0.5.39.tgz#d00705f31c5e6617145e84bb9dd50156cf3b01c5" integrity sha512-4XusxLX8PnHDQxtRP25PImlkIj1Mlx6wt0NWb1FxQGvTJOAgXGJZl3YB02ZeXZLYbeKA2A3AqqxFTTKbADnZng== @@ -288,25 +288,6 @@ widest-line "^3.1.0" wrap-ansi "^7.0.0" -"@oclif/dev-cli@^1.21.3": - version "1.26.0" - resolved "https://registry.yarnpkg.com/@oclif/dev-cli/-/dev-cli-1.26.0.tgz#e3ec294b362c010ffc8948003d3770955c7951fd" - integrity sha512-272udZP+bG4qahoAcpWcMTJKiA+V42kRMqQM7n4tgW35brYb2UP5kK+p08PpF8sgSfRTV8MoJVJG9ax5kY82PA== - dependencies: - "@oclif/command" "^1.8.0" - "@oclif/config" "^1.17.0" - "@oclif/errors" "^1.3.3" - "@oclif/plugin-help" "^3.2.0" - cli-ux "^5.2.1" - debug "^4.1.1" - find-yarn-workspace-root "^2.0.0" - fs-extra "^8.1" - github-slugger "^1.2.1" - lodash "^4.17.11" - normalize-package-data "^3.0.0" - qqjs "^0.3.10" - tslib "^2.0.3" - "@oclif/errors@^1.2.1", "@oclif/errors@^1.2.2", "@oclif/errors@^1.3.3": version "1.3.4" resolved "https://registry.yarnpkg.com/@oclif/errors/-/errors-1.3.4.tgz#a96f94536b4e25caa72eff47e8b3ed04f6995f55" @@ -343,7 +324,7 @@ chalk "^2.4.2" tslib "^1.9.3" -"@oclif/plugin-help@^3", "@oclif/plugin-help@^3.1.0", "@oclif/plugin-help@^3.2.0": +"@oclif/plugin-help@^3": version "3.2.2" resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-3.2.2.tgz#063ee08cee556573a5198fbdfdaa32796deba0ed" integrity sha512-SPZ8U8PBYK0n4srFjCLedk0jWU4QlxgEYLCXIBShJgOwPhTTQknkUlsEwaMIevvCU4iCQZhfMX+D8Pz5GZjFgA== @@ -359,6 +340,13 @@ widest-line "^3.1.0" wrap-ansi "^4.0.0" +"@oclif/plugin-help@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-5.1.0.tgz#002816410d41c8fb50157626adb6fc1889eaed89" + integrity sha512-PGbgC32OLFqciUSAjNxOWUMob/Yz5k6AwulS4X924WM6/pARQz91lqTBj4WWxNFoOSS1eT+CtB1nPmypCQXebQ== + dependencies: + "@oclif/core" "^0.5.39" + "@oclif/plugin-not-found@^1.2.2": version "1.2.4" resolved "https://registry.yarnpkg.com/@oclif/plugin-not-found/-/plugin-not-found-1.2.4.tgz#160108c82f0aa10f4fb52cee4e0135af34b7220b" @@ -5308,7 +5296,7 @@ tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.3: +tslib@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.2.0.tgz#fb2c475977e35e241311ede2693cee1ec6698f5c" integrity sha512-gS9GVHRU+RGn5KQM2rllAlR3dU6m7AcpJKdtH8gFvQiC4Otgk98XnmMU+nZenHt/+VhnBPWwgrJsyrdcw6i23w==