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

Studio-2364 Update d3-color and remove d3-color-difference dependency #6

Merged
merged 5 commits into from
May 28, 2024

Conversation

badiuoanaalexandra
Copy link
Contributor

@badiuoanaalexandra badiuoanaalexandra commented May 27, 2024

d3-color needs to be updated to get rid of critical security vulnerability, but d3-color-difference package hasn't been updated in 6 years and still uses old version of d3-color.

I tried to search and use alternative libraries (such as color-diff), but it looks like the results are different.

In the end since we are using just the differenceCiede2000 method I just copied this and its test from the original package, removed d3-color-difference and added direct dependency to d3-color.

Also had to add jest config and babel config because d3-color switched esm and tests weren't working anymore

Related ticket STUDIO-2364 Address security vulnerabilities in Studio

Copy link
Member

@tristen tristen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me! Just a quick note on the version.

package.json Outdated
@@ -1,6 +1,6 @@
{
"name": "@mapbox/to-color",
"version": "2.1.0",
"version": "3.0.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"version": "3.0.0",
"version": "2.1.1",

I think this can just be a patched version as no functionality has changed in the build.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed

@badiuoanaalexandra badiuoanaalexandra merged commit 895c00e into publisher-production May 28, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants