Breaking changes (regression ?) with kleur 3.0.3
fraxken opened this issue · 5 comments
Hi,
I recently upgraded dependencies on one of my CLI packages and noticed that the colors was broken (see below example with before/after).
Before update (3.0.2) https://imgur.com/XLiEhxq
After update (3.0.3) https://imgur.com/KGamCXm
My packages is open if you want to check yourself: https://github.com/fraxken/dep-updater
I feel that my first bold green is not reseted and applied by default to all others (something like that).
Best Regards,
Thomas
Hey, thank you!
I will take a look at it today and update here once I've got news :)
I know there are tests for this, but perhaps they're not extensive enough
Hmm... so I will have to clone the library and play with it locally. I started off by just copying all the console.log
s with kleur chains inside of them.
This is running off kleur@master
. Snippet to follow, but everything seems to look ok:
const { bold, red, green, yellow, cyan, gray, white } = require('.');
const NAME = 'mri';
const CURRENT = '1.2.0';
const TARGET = '1.2.2';
console.log(red().bold(`\n > Unstaged modification detected on ${yellow().bold("package.json")}\n`));
console.log(`\n${gray().bold(" > npm outdated --json")}`);
console.log(`\n${green().bold(NAME)} (${yellow().bold(CURRENT)} -> ${cyan().bold(TARGET)})`);
console.log(`wanted (${yellow().bold('wanted')})`);
console.log(`latest (${yellow().bold('latest')})`);
console.log(white().bold(`\nNo package to update.. ${red("exiting process")}`));
console.log(`\n${gray().bold(" > Configuration")}\n`);
console.log(`\n${gray(" > Everything is okay ... Running update in one second.")}\n`);
console.log(`\nupdating ${bold(green(NAME))} (${yellow(CURRENT)} -> ${cyan(TARGET)})`);
console.log(red(`\n > Failed to update ${NAME} package!`));
console.log(" > package has been removed, rollback installation");
console.log(" > npm test");
console.log(red("An Error occured while executing tests!"));
console.log("Rollback to previous version!");
console.log(` > git commit -m ${yellow("commit message")}`);
console.log("\nAll packages updated !\n");
Hmm weird. Seem to only bug with this given package (i have other CLI with the 3.0.3 and everything seem to work as expected).
By the way i'm on Windows 10. I will make some test on my Ubuntu to check if this is scoped to Windows or not.
Ok..
After a complete re-installation of the 3.0.3 everything seem to work as expected. 😕
I guess the problem was a bad local installation... My fault, I should have been more careful and go further in my test. Not sure to understood what was exact the problem here.
Sorry for inconvenience, i will keep on alert on this. I'm closing !
No problem! Please keep me posted if you happen to figure out more details about what happened