Skip to content

Commit

Permalink
chore(repo): bump cliui (#19374)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder authored Oct 3, 2023
1 parent a11e8f1 commit df83e0e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 68 deletions.
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.

1 comment on commit df83e0e

@vercel
Copy link

@vercel vercel bot commented on df83e0e Oct 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev
nx-dev-git-master-nrwl.vercel.app

Please sign in to comment.