diff --git a/package-lock.json b/package-lock.json index d1991b14e..ccd30a1dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,11 +10,11 @@ "license": "MIT", "dependencies": { "@code-pushup/portal-client": "^0.1.2", + "@isaacs/cliui": "^8.0.2", "@swc/helpers": "~0.5.0", "bundle-require": "^4.0.1", "chalk": "^5.3.0", "cli-table3": "^0.6.3", - "cliui": "^8.0.1", "multi-progress-bars": "^5.0.3", "simple-git": "^3.20.0", "yargs": "^17.7.2", @@ -3077,6 +3077,95 @@ "node": ">=6.9.0" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@istanbuljs/load-nyc-config": { "version": "1.1.0", "dev": true, @@ -20430,6 +20519,20 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/string.prototype.matchall": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", @@ -20505,6 +20608,18 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "4.0.0", "dev": true, @@ -22211,6 +22326,53 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, "node_modules/wrap-ansi/node_modules/ansi-styles": { "version": "4.3.0", "license": "MIT", diff --git a/package.json b/package.json index cbfd6c381..5db4b7376 100644 --- a/package.json +++ b/package.json @@ -12,11 +12,11 @@ }, "dependencies": { "@code-pushup/portal-client": "^0.1.2", + "@isaacs/cliui": "^8.0.2", "@swc/helpers": "~0.5.0", "bundle-require": "^4.0.1", "chalk": "^5.3.0", "cli-table3": "^0.6.3", - "cliui": "^8.0.1", "multi-progress-bars": "^5.0.3", "simple-git": "^3.20.0", "yargs": "^17.7.2", diff --git a/packages/utils/package.json b/packages/utils/package.json index 4aecd26bf..3109fea08 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -5,7 +5,7 @@ "@code-pushup/models": "*", "bundle-require": "^4.0.1", "chalk": "^5.3.0", - "cliui": "^8.0.1", + "@isaacs/cliui": "^8.0.2", "simple-git": "^3.20.0", "multi-progress-bars": "^5.0.3", "cli-table3": "^0.6.3" diff --git a/packages/utils/src/lib/__snapshots__/report-to-stdout.spec.ts.snap b/packages/utils/src/lib/__snapshots__/report-to-stdout.spec.ts.snap index f58c460cb..0d55b3f4f 100644 --- a/packages/utils/src/lib/__snapshots__/report-to-stdout.spec.ts.snap +++ b/packages/utils/src/lib/__snapshots__/report-to-stdout.spec.ts.snap @@ -9,14 +9,14 @@ ESLint audits ● Disallow assignment operators in conditional expressions 0 ● Disallow reassigning \`const\` variables 0 ● Disallow the use of \`debugger\` 0 -● Disallow invalid regular expression strings in \`RegExp\` construct 0 - ors -● Disallow the use of undeclared variables unless mentioned in \`/*g 0 - lobal */\` comments +● Disallow invalid regular expression strings in \`RegExp\` 0 + constructors +● Disallow the use of undeclared variables unless mentioned in 0 + \`/*global */\` comments ● Disallow loops with a body that allows only one iteration 0 ● Disallow negating the left operand of relational operators 0 -● Disallow use of optional chaining in contexts where the \`undefine 0 - d\` value is not allowed +● Disallow use of optional chaining in contexts where the 0 + \`undefined\` value is not allowed ● Disallow unused variables 1 warning ● Require calls to \`isNaN()\` when checking for \`NaN\` 0 ● Enforce comparing \`typeof\` expressions against valid strings 0 @@ -29,11 +29,11 @@ ESLint audits ● Disallow variable declarations from shadowing variables declared 3 warnings in the outer scope ● Require \`let\` or \`const\` instead of \`var\` 0 -● Require or disallow method and property shorthand syntax for obje 3 warnings - ct literals +● Require or disallow method and property shorthand syntax for 3 warnings + object literals ● Require using arrow functions for callbacks 0 -● Require \`const\` declarations for variables that are never reassig 1 warning - ned after declared +● Require \`const\` declarations for variables that are never 1 warning + reassigned after declared ● Disallow using Object.assign with an object literal as the first 0 argument and prefer the use of object spread instead ● Require or disallow \\"Yoda\\" conditions 0 @@ -41,8 +41,8 @@ ESLint audits ● Disallow missing props validation in a React component definition 6 warnings ● Disallow missing React when using JSX 0 ● enforces the Rules of Hooks 0 -● verifies the list of dependencies for Hooks like useEffect and si 2 warnings - milar +● verifies the list of dependencies for Hooks like useEffect and 2 warnings + similar ● Disallow missing displayName in a React component definition 0 ● Disallow comments from being inserted as text nodes 0 ● Disallow duplicate properties in JSX 0 @@ -51,8 +51,8 @@ ESLint audits ● Disallow React to be incorrectly marked as unused 0 ● Disallow variables used in JSX to be incorrectly marked as unused 0 ● Disallow passing of children as props 0 -● Disallow when a DOM element is using both children and dangerousl 0 - ySetInnerHTML +● Disallow when a DOM element is using both children and 0 + dangerouslySetInnerHTML ● Disallow usage of deprecated methods 0 ● Disallow direct mutation of this.state 0 ● Disallow usage of findDOMNode 0 diff --git a/packages/utils/src/lib/report-to-stdout.ts b/packages/utils/src/lib/report-to-stdout.ts index c6644c789..6aec8658e 100644 --- a/packages/utils/src/lib/report-to-stdout.ts +++ b/packages/utils/src/lib/report-to-stdout.ts @@ -1,6 +1,6 @@ +import cliui from '@isaacs/cliui'; import chalk from 'chalk'; import Table from 'cli-table3'; -import cliui from 'cliui'; import { NEW_LINE } from './md'; import { CODE_PUSHUP_DOMAIN,