From 78c2741b69ea63c1e761f458578f263e036e8199 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Thu, 23 Jul 2020 03:22:36 +0300 Subject: [PATCH] fix(list): don't use inverse to highight close #2697 PR #2703 --- .changeset/tame-spoons-provide.md | 5 +++++ packages/list/src/renderTree.ts | 2 +- packages/list/test/index.ts | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/tame-spoons-provide.md diff --git a/.changeset/tame-spoons-provide.md b/.changeset/tame-spoons-provide.md new file mode 100644 index 0000000000..d20542b02a --- /dev/null +++ b/.changeset/tame-spoons-provide.md @@ -0,0 +1,5 @@ +--- +"@pnpm/list": patch +--- + +Don't use inverse as it doesn't look good in all consoles. diff --git a/packages/list/src/renderTree.ts b/packages/list/src/renderTree.ts index 8529fc6519..9016777454 100644 --- a/packages/list/src/renderTree.ts +++ b/packages/list/src/renderTree.ts @@ -130,7 +130,7 @@ function printLabel (getPkgColor: GetPkgColor, node: PackageNode) { if (node.isSkipped) { txt += ' skipped' } - return node.searched ? chalk.bold.inverse(txt) : txt + return node.searched ? chalk.bold(txt) : txt } function getPkgColor (node: PackageNode) { diff --git a/packages/list/test/index.ts b/packages/list/test/index.ts index 2e7d866d39..4ab7218bb6 100644 --- a/packages/list/test/index.ts +++ b/packages/list/test/index.ts @@ -19,7 +19,7 @@ const DEV_DEPENDENCIES = chalk.cyanBright('devDependencies:') const OPTIONAL_DEPENDENCIES = chalk.cyanBright('optionalDependencies:') const UNSAVED_DEPENDENCIES = chalk.cyanBright('not saved (you should add these dependencies to package.json if you need them):') -const highlighted = chalk.bold.inverse +const highlighted = chalk.bold const fixtures = path.join(__dirname, '../../../fixtures') const fixture = path.join(fixtures, 'fixture')