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

Remove kleur #170

Open
fraxken opened this issue Dec 31, 2024 · 0 comments
Open

Remove kleur #170

fraxken opened this issue Dec 31, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@fraxken
Copy link
Member

fraxken commented Dec 31, 2024

Since Node.js v21 a new native styleText has been introduced

const { styleText } = require('node:util');
const errorMessage = styleText('red', 'Error! Error!');
console.log(errorMessage);

The next major could drop that dependency to use that instead

const kLogSymbols = process.platform !== "win32" || process.env.CI || process.env.TERM === "xterm-256color" ?
{ success: kleur.bold().green("✔"), error: kleur.bold().red("✖") } :
{ success: kleur.bold().green("√"), error: kleur.bold().red("×") };

However we have to see if that break the "color" option

@fraxken fraxken added enhancement New feature or request good first issue Good for newcomers labels Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant