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!: use @oclif/table #635

Merged
merged 8 commits into from
Oct 17, 2024
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
21 changes: 0 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,6 @@ jobs:
needs: linux-unit-tests
uses: salesforcecli/github-workflows/.github/workflows/unitTestsWindows.yml@main

integration:
needs: linux-unit-tests
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node_version: [lts/*, latest]
exclude:
- os: windows-latest
node_version: lts/*
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: yarn
- uses: salesforcecli/github-workflows/.github/actions/yarnInstallWithRetries@main
- run: yarn build
- run: yarn test:integration

external-nuts-deploy-retrieve:
name: external-nuts-deploy-retrieve
needs: linux-unit-tests
Expand Down
1,408 changes: 320 additions & 1,088 deletions CHANGELOG.md

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"prepack": "sf-prepack",
"prepare": "sf-install",
"test": "wireit",
"test:integration": "mocha test/**/*.integration.ts --timeout 30000",
"test:only": "wireit"
},
"exports": {
Expand All @@ -46,6 +45,7 @@
"dependencies": {
"@inquirer/confirm": "^3.1.22",
"@inquirer/password": "^2.2.0",
"@oclif/table": "^0.1.19",
"@oclif/core": "^4.0.27",
"@salesforce/core": "^8.5.1",
"@salesforce/kit": "^3.2.3",
Expand All @@ -59,6 +59,7 @@
},
"devDependencies": {
"@inquirer/type": "^1.5.2",
"@oclif/test": "^4.0.9",
"@salesforce/dev-scripts": "^10.2.10",
"@types/cli-progress": "^3.11.6",
"eslint-plugin-sf-plugin": "^1.20.7",
Expand Down
1 change: 1 addition & 0 deletions src/exported.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export { toHelpSection, parseVarArgs } from './util.js';
export { Progress } from './ux/progress.js';
export { Spinner } from './ux/spinner.js';
export { Ux } from './ux/ux.js';
export { convertToNewTableAPI } from './ux/table.js';
export { StandardColors } from './ux/standardColors.js';

export { SfCommand, SfCommandInterface } from './sfCommand.js';
Expand Down
5 changes: 3 additions & 2 deletions src/sfCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
StructuredMessage,
} from '@salesforce/core';
import type { AnyJson } from '@salesforce/ts-types';
import { TableOptions } from '@oclif/table';
import { Progress } from './ux/progress.js';
import { Spinner } from './ux/spinner.js';
import { Ux } from './ux/ux.js';
Expand Down Expand Up @@ -235,8 +236,8 @@ export abstract class SfCommand<T> extends Command {
/**
* Display a table on the console. Will automatically be suppressed when --json flag is present.
*/
public table<R extends Ux.Table.Data>(data: R[], columns: Ux.Table.Columns<R>, options?: Ux.Table.Options): void {
this.ux.table(data, columns, options);
public table<R extends Record<string, unknown>>(options: TableOptions<R>): void {
this.ux.table(options);
}

/**
Expand Down
Loading
Loading