fix(list): highlight in terminal with light theme

This commit is contained in:
Zoltan Kochan
2020-06-21 13:46:42 +03:00
parent 0e3bdbdc9c
commit 6743767573
3 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"@pnpm/list": patch
---
Highlight searched items with inverse. Works better in terminals with light theme.

View File

@@ -130,7 +130,7 @@ function printLabel (getPkgColor: GetPkgColor, node: PackageNode) {
if (node.isSkipped) {
txt += ' skipped'
}
return node.searched ? chalk.bold.bgBlack(txt) : txt
return node.searched ? chalk.bold.inverse(txt) : txt
}
function getPkgColor (node: PackageNode) {

View File

@@ -20,7 +20,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.bgBlack
const highlighted = chalk.bold.inverse
const fixture = path.join(__dirname, 'fixture')
const fixtureWithNoPkgNameAndNoVersion = path.join(__dirname, 'fixture-with-no-pkg-name-and-no-version')