david icon indicating copy to clipboard operation
david copied to clipboard

Package Name does not appear on powershell

Open anantoghosh opened this issue 9 years ago • 3 comments

Using david (9.0.0) on local windows 10 machine (x64 build 14393) with powershell (5.1.14393.206).

When showing available updates it does not show the package names.

david

anantoghosh avatar Nov 17 '16 06:11 anantoghosh

Probably starting at line 101 in bin/david.js table.push([ clc.magenta(name), clc.red(dep.required), clc.green(dep[argv.unstable ? 'latest' : 'stable']) ])

That particular line: clc.magenta(name)

inserts the name of the package into left-most cell, using magenta as color. And that color doesn't render well on a Powershell's blue background.

I guess the text "npm" is found, if you select (paint) the blank-looking table cell with mouse?

This is a "best guess". I'm out of MS Windows totally, so can't test results of changing the color. Hope a test can reveal whether another approach to color works.

jpaulin avatar Dec 03 '16 11:12 jpaulin

That's what I thought too. Found this https://github.com/chalk/chalk/issues/2 Seems like magenta is changed to deep blue in powershell. Tested with different color, works.

anantoghosh avatar Dec 03 '16 17:12 anantoghosh

Thanks for the link to chalk talk about colors.

One solution would be to

  • first identify platform (Win/Mac/Linux) and store this in a "global enough" (scope) variable
  • define colors (safe ones) based on the platform, knowing there are some "invisible" combinations

Albeit (probably) easy thing to do, this would be worth thinking: "Is this (david) the right place to do such a color patch?" @alanshaw

jpaulin avatar Dec 23 '16 07:12 jpaulin