chore: replace `css-color-converter` with `color`
It looks like the css-color-converter is lacking maintenance. Here I replaced the css-color-converter with the color library. The color library is pure ESM and more modern.
I'm also the maintainer of the color projects (color, color-convert, color-string). And the author of the color project Qix- is also the maintainer of the most popular ANSI color library - Chalk.
Here are some slight differences between color and css-color-converter:
color |
css-color-converter |
|
|---|---|---|
| rgb | Yes | Yes |
| rgba | Yes | Yes |
| hsl | Yes | Yes |
| hsla | Yes | Yes |
| CSS keywords | Yes | Yes |
| Hex colors | Yes | Yes |
| hwb | Yes | No |
| Negative values | Yes | No |
I've updated the documentation for the new HWB support.
There are some unrelated changes because Prettier reported some code style problems while running npm test. I've fixed them with npx pretter --write ..
| Warnings | |
|---|---|
| :warning: | This PR modified service code for endpoint but not its test code. That's okay so long as it's refactoring existing code. |
| :warning: | This PR modified service code for static-badge but not its test code. That's okay so long as it's refactoring existing code. |
| Messages | |
|---|---|
| :book: | :sparkles: Thanks for your contribution to Shields, @LitoMore! |
| :book: |
Thanks for contributing to our documentation. We :heart: our documentarians! |
Generated by :no_entry_sign: dangerJS against ce5097d6353828d62da8d22f50748c23c92f66d0
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
| Diff | Package | Supply Chain Security |
Vulnerability | Quality | Maintenance | License |
|---|---|---|---|---|---|---|
| color@5.0.0 |
Thanks for catching the issue. I also noticed the upstream library color-string cannot recognize the no-comma HWB values. I've created a PR to fix it. Let's wait for the upstream to apply the fix.
This is arguably a performance-sensitive part of our codebase, as it impacts the rendering of all badges. It would be great to do some quick performance analysis to make sure we aren't introducing overhead with the new library. :)
Just wanted to add to my previous message: we do have some simple things in place to do micro-benchmarks, see this page in our docs!