-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fixed issue #1123 extra color for bolded text in the output #5023
Conversation
This change will decrease the build size from 10.26 MB to 10.25 MB, a decrease of 4.12 KB (0%)
|
@Koreris, nice first PR! |
@Koreris, can you update the snapshots |
This seems fine to me, I don't have a strong opinion on the bold/not bold usage in the formatter. |
@bestander I have been looking for that file but maybe I'm looking in the wrong folder? Because I don't seem to find it |
Maybe it is OS specific. Try |
@bestander Hi! Me and @Koreris found the file but don't know exactly what to do with it. |
You need to run command |
Hi @Koreris thanks for the contribution! I'd like to ask you to move the color change to a different spot in the code. Having it in A bit of a hint is that in this code block: const output = ({name, children, hint, color}, titlePrefix, childrenPrefix) => {
const formatter = this.format.bold;
const out = getFormattedOutput({
prefix: titlePrefix,
hint,
color: 'cyan',
name,
formatter,
});
this.stdout.write(out);
if (children && children.length) {
recurseTree(sortTrees(children), childrenPrefix, output);
}
}; the Anyway, if you backtrack through the code a bit, you can find that the
So There seems to be a bigger issue in what the output shows when doing a
is causing all the output for
For the unit tests, look in
so when it was changed to You can run Hope this helps! Thanks again! |
@rally25rs Thanks for the feedback, it's much appreciated! I'll work on it as soon as I can and fix those problems. |
It also looks like somewhere along the way we got a I also think the commits that merged then reverted the merge with |
Late to the party, sorry about that.
edit: went back and looked at previous discussion again. I think this works. 👍 @Koreris If someone disables terminal colors, I imagine it stays consistent and outputs as normal? i.e. no bolded text, just plain tree output Lastly -- is there a preference of |
+1 to @rally25rs comment. We'll need to remove the |
I'm going to close this PR for now to have a better overview of the ones currently active, but feel free to reopen it once you've been able to work on @rally25rs's comment! And thanks for your involvement into making Yarn even better 😄 |
Summary
This pull request presents a solution for issue #1123, adding the suggested color for the bolded input.
Motivation
This issue was picked because as we didn't have much experience, this seemed like a good first issue so we could have some entry way point.
This isn't a substantial bug fix or feature request, it merely adds the convenience of distinguishing better which dependencies were updated, by bolding them and giving them a different color in the tree that shows up after
yarn add
is used.Test plan
We tested the developed code by installing different versions of "lodash" by doing
yarn add [email protected]
for an exemple, but we kept changing the versions so we could see the tree with the altered dependencies. We also tested with another package, standard-versionyarn add [email protected]
, following a similar procedure. We were only able to test on Windows so far.The result can be seen in the following images
EDIT: By distraction I had created a pull request in my own fork of the repo, however as I noticed it I fixed it by creating this one.