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

chore(repo): bump cliui #19374

Merged
merged 1 commit into from
Oct 3, 2023
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@
"@zkochan/js-yaml": "0.0.6",
"axios": "1.0.0",
"classnames": "^2.3.1",
"cliui": "^7.0.2",
"cliui": "^8.0.1",
"core-js": "^3.6.5",
"enquirer": "~2.3.6",
"fast-glob": "3.2.7",
Expand Down
2 changes: 1 addition & 1 deletion packages/nx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"chalk": "^4.1.0",
"cli-cursor": "3.1.0",
"cli-spinners": "2.6.1",
"cliui": "^7.0.2",
"cliui": "^8.0.1",
"dotenv": "~16.3.1",
"dotenv-expand": "~10.0.0",
"enquirer": "~2.3.6",
Expand Down
17 changes: 10 additions & 7 deletions packages/nx/src/utils/print-help.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import * as chalk from 'chalk';
import * as stringWidth from 'string-width';
// cliui is the CLI layout engine developed by, and used within, yargs
import * as cliui from 'cliui';
import { logger } from './logger';
import { output } from './output';
import { Schema } from './params';
import { nxVersion } from './versions';
import { readModulePackageJson } from './package-json';

// cliui is the CLI layout engine developed by, and used within, yargs
// the typings for cliui do not play nice with our tsconfig, it either
// works in build or in test but not both.
const cliui = require('cliui') as typeof import('cliui')['default'];

export function printHelp(
header: string,
schema: Schema,
Expand Down Expand Up @@ -91,7 +94,7 @@ function generateGeneratorOverviewOutput({
description: string;
aliases: string[];
}): string {
const ui = cliui();
const ui = cliui(null);
const overviewItemsLabelWidth =
// Chars in labels "From" and "Name"
4 +
Expand Down Expand Up @@ -156,7 +159,7 @@ function generateExecutorOverviewOutput({
name: string;
description: string;
}): string {
const ui = cliui();
const ui = cliui(null);
const overviewItemsLeftPadding = 2;
const overviewItemsLabelWidth = overviewItemsLeftPadding + 'Executor:'.length;

Expand Down Expand Up @@ -204,7 +207,7 @@ const formatOptionType = (optionConfig: Schema['properties'][0]) => {
};

function generateOptionsOutput(schema: Schema): string {
const ui = cliui();
const ui = cliui(null);
const flagAndAliasLeftPadding = 4;
const flagAndAliasRightPadding = 4;

Expand Down Expand Up @@ -281,7 +284,7 @@ function generateOptionsOutput(schema: Schema): string {
{
text: renderedTypesAndDefault,
padding: [0, 0, 0, 0],
align: 'right',
align: 'right' as const,
},
];

Expand All @@ -295,7 +298,7 @@ function generateExamplesOutput(schema: Schema): string {
if (!schema.examples || schema.examples.length === 0) {
return '';
}
const ui = cliui();
const ui = cliui(null);
const xPadding = 4;

ui.div({
Expand Down
68 changes: 9 additions & 59 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.