-
Notifications
You must be signed in to change notification settings - Fork 112
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
Mitch/info clikit #4134
base: main
Are you sure you want to change the base?
Mitch/info clikit #4134
Conversation
Thanks for your contribution! Depending on what you are working on, you may want to request a review from a Shopify team:
|
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationspackages/cli-kit/dist/public/node/ui/Table/Column.d.tsexport interface Column<T> {
name: keyof T;
width: number;
color?: string;
}
packages/cli-kit/dist/public/node/ui/Table/Row.d.ts/// <reference types="react" />
import ScalarDict from './ScalarDict.js';
import { Column } from './Column.js';
interface RowProps<T extends ScalarDict> {
fillerChar: string;
rowKey: string;
data: Partial<T>;
columns: Column<T>[];
ignoreColumnColor?: boolean;
}
declare const Row: <T extends ScalarDict>({ rowKey, columns, data, fillerChar, ignoreColumnColor }: RowProps<T>) => JSX.Element;
export { Row };
packages/cli-kit/dist/public/node/ui/Table/ScalarDict.d.tstype Scalar = string | number | boolean | null | undefined;
export default interface ScalarDict {
[key: string]: Scalar;
}
export {};
packages/cli-kit/dist/public/node/ui/Table/Table.d.ts/// <reference types="react" />
import ScalarDict from './ScalarDict.js';
import { ForegroundColor } from 'chalk';
export type TableColumn<T> = {
[column in keyof T]: {
header?: string;
color?: ForegroundColor | 'dim';
};
};
export interface TableProps<T extends ScalarDict> {
rows: T[];
columns: TableColumn<T>;
}
declare function Table<T extends ScalarDict>({ rows, columns: columnsConfiguration }: TableProps<T>): JSX.Element;
export { Table };
Existing type declarationspackages/cli-kit/dist/public/node/ui.d.ts@@ -1,12 +1,12 @@
/// <reference types="node" resolution-mode="require"/>
import { FatalError as Fatal } from './error.js';
import { Logger, LogLevel } from './output.js';
+import ScalarDict from './ui/Table/ScalarDict.js';
+import { TableColumn, TableProps } from './ui/Table/Table.js';
import { ConcurrentOutputProps } from '../../private/node/ui/components/ConcurrentOutput.js';
import { handleCtrlC, render } from '../../private/node/ui.js';
import { AlertOptions } from '../../private/node/ui/alert.js';
import { CustomSection } from '../../private/node/ui/components/Alert.js';
-import ScalarDict from '../../private/node/ui/components/Table/ScalarDict.js';
-import { TableColumn, TableProps } from '../../private/node/ui/components/Table/Table.js';
import { InlineToken, LinkToken, ListToken, TokenItem } from '../../private/node/ui/components/TokenizedText.js';
import { DangerousConfirmationPromptProps } from '../../private/node/ui/components/DangerousConfirmationPrompt.js';
import { SelectPromptProps } from '../../private/node/ui/components/SelectPrompt.js';
@@ -309,7 +309,7 @@ export interface RenderAutocompleteOptions<T> extends PartialBy<Omit<Autocomplet
*
*/
export declare function renderAutocompletePrompt<T>({ renderOptions, ...props }: RenderAutocompleteOptions<T>, uiDebugOptions?: UIDebugOptions): Promise<T>;
-interface RenderTableOptions<T extends ScalarDict> extends TableProps<T> {
+export interface RenderTableOptions<T extends ScalarDict> extends TableProps<T> {
renderOptions?: RenderOptions;
}
/**
@@ -394,4 +394,4 @@ interface IsTTYOptions {
export declare function isTTY({ stdin, uiDebugOptions }: IsTTYOptions): boolean;
export type Key = InkKey;
export type InfoMessage = InfoMessageProps['message'];
-export { Task, TokenItem, InlineToken, LinkToken, TableColumn, InfoTableSection, ListToken, render, handleCtrlC };
\ No newline at end of file
+export { Task, TokenItem, InlineToken, LinkToken, TableColumn, InfoTableSection, ListToken, render, handleCtrlC, ScalarDict, };
\ No newline at end of file
|
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success1720 tests passing in 794 suites. Report generated by 🧪jest coverage report action from 1fcf0bb |
WHY are these changes introduced?
Fixes #0000
WHAT is this pull request doing?
How to test your changes?
Post-release steps
Measuring impact
How do we know this change was effective? Please choose one:
Checklist