Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove cli-ux #257

Merged
merged 1 commit into from
Jan 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"author": "Salesforce",
"bugs": "https://github.com/oclif/plugin-commands/issues",
"dependencies": {
"@oclif/core": "^1.0.8",
"cli-ux": "^6.0.5",
"@oclif/core": "^1.2.0",
"lodash": "^4.17.11"
},
"devDependencies": {
Expand All @@ -25,7 +24,7 @@
"mocha": "^8",
"nock": "^13.0.0",
"nyc": "^15.1.0",
"oclif": "2.0.0-main.14",
"oclif": "^2.3.0",
"shx": "^0.3.3",
"ts-node": "^9.1.1",
"tslib": "^2.0.0",
Expand Down
8 changes: 3 additions & 5 deletions src/commands/commands.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {Command, Flags, toConfiguredId} from '@oclif/core'
import {ux} from 'cli-ux'
import {CliUx, Command, Flags, toConfiguredId} from '@oclif/core'
import * as _ from 'lodash'
import {EOL} from 'os'

Expand All @@ -9,11 +8,10 @@ export default class Commands extends Command {

static enableJsonFlag = true

// to-do: update this type when cli-ux is on core
static flags: any = {
help: Flags.help({char: 'h'}),
hidden: Flags.boolean({description: 'show hidden commands'}),
...ux.table.flags(),
...CliUx.ux.table.flags(),
}

async run() {
Expand Down Expand Up @@ -53,7 +51,7 @@ export default class Commands extends Command {
return formatted
}

ux.table(commands.map(command => {
CliUx.ux.table(commands.map(command => {
// Massage some fields so it looks good in the table
command.description = (command.description || '').split(EOL)[0]
command.summary = (command.summary || (command.description || '').split(EOL)[0])
Expand Down
Loading