Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extra color for bolded text in the output #1123

Open
e-cloud opened this issue Oct 16, 2016 · 18 comments
Open

extra color for bolded text in the output #1123

e-cloud opened this issue Oct 16, 2016 · 18 comments

Comments

@e-cloud
Copy link

e-cloud commented Oct 16, 2016

Do you want to request a feature or report a bug?
feature

What is the current behavior?
the installed/changed dependencies in the output are bolded without color escaped
image

What is the expected behavior?
give some color to the bolded text, perhaps cyan :).

Please mention your node.js, yarn and operating system version.
node v6.8.0
yarn v0.15.1
ubuntu 16.04

@samccone
Copy link
Member

@e-cloud thanks for the issue. this would make for a great first issue.

your contributions are welcome here!

@akshbn
Copy link

akshbn commented Oct 25, 2016

I would like to take this up, if no one is working on it.

@olingern
Copy link
Contributor

@akshbn @samccone I'm knee deep in the tree reporter, would it make sense for me to take this up? Should be super simple and could be a small addition to #1463

@akshbn
Copy link

akshbn commented Oct 28, 2016

@olingern i managed to change the format from bold to color,ie, the content gets colored but its no more bold. still haven't dived deep enough to retain the format to bold n assign it a color. If you are able to do this, please go ahead. If not, do tell and i shall send a PR.

@olingern
Copy link
Contributor

olingern commented Oct 31, 2016

@akshbn Not sure when #1463 will merge, so here's an example of coloring output, if you'd still like to take a look.

It specifically uses a package, chalk, to color strings. It is bound on this.format inside of console-reporter.js.

@akshbn
Copy link

akshbn commented Nov 1, 2016

@olingern thanks man! will check it out.

@olingern
Copy link
Contributor

olingern commented Nov 7, 2016

I wanted to pick back up on this since #1463 was merged, and I wanted to understand the reasoning behind bolding before changing the color, since it's closely related to tree output that I worked with.

In the latest stable release, there's a condition that evaluates to remove bold, if the package's version differs from its original. but I'm unsure of what triggers this scenario.

Why display both? Why not filter to only display (below) "[email protected]" ?

screen shot 2016-11-07 at 5 33 56 pm

pinging @kittens as it looks like this landed in this commit.

@bestander
Copy link
Member

I think it does not display second level dependencies anymore, looks like got broken

@ClaudiaRaquelGuedes
Copy link

If no one is working on it, I'll try to create a pull request and submit when finished.

@samccone
Copy link
Member

👍 @ClaudiaRaquelGuedes let us know if you needed any help :)

@ClaudiaRaquelGuedes
Copy link

@samccone Hi :) I was wondering if there was a way to install older versions of dependencies so that I could test updating and seeing if the behaviour persists. Thanks in advance. 👍

@e-cloud
Copy link
Author

e-cloud commented Nov 16, 2017

I'm afraid no automatic approach. You have to change the version number manually, then update it to new number for tests.

@ClaudiaRaquelGuedes
Copy link

Hi again, I have been working on the issue but it seems a bit hard to recreate it. As said before, second level dependencies are no longer shown and the text doesn't appear with color or bold when I update the versions. Is this related to npm in some way or was the issue merged previously? Thanks in advance.

@e-cloud
Copy link
Author

e-cloud commented Nov 23, 2017

emmm, yes, the latest behavior is different to a large extent. Original request is invalid now.

But, could we implement a logic to make the target dependencies bold and colored?
Take an example, if i yarn add lodash, the lodash line in yarn output is bold and color

@a-amaria
Copy link

a-amaria commented Dec 1, 2017

Hello, @ClaudiaRaquelGuedes and I have solved this issue, as you can see in this image. The text's now bolded and in cyan, as suggested. If you see no problems with the solution, we'll create a pull request.

image

@ClaudiaRaquelGuedes
Copy link

@samccone , @bestander , @BYK I was wondering if maybe you can review the changes? Is the issue fixed as expected? Thanks in advance.

@bestander
Copy link
Member

bestander commented Dec 9, 2017

@ClaudiaRaquelGuedes, we are waiting for you to send us a PR.
Very much appreciated.

Update: sorry for snark, the PR is there!
I was in my semi-automated mode answering a very regular question "when is this issue going to be fixed" and misread that you pinged us to review the PR.
My fault

@bestander
Copy link
Member

I'll review it now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants