guardian / giant

Platform for journalists to search, analyse, categorise and share unstructured data
Apache License 2.0
53 stars 3 forks source link

upgrade elastic/charts from v57 to v66 #226

Closed marjisound closed 4 months ago

marjisound commented 4 months ago

What does this change?

Upgrade elastic/charts from v57.0.0 to v66.1.0. The only usage of this dependancy is in TimeHistogram.js and the upgrade does not have any breaking changes in our code base apart from the chart colour which I fixed.

I updated this as an attempt to fix the d3-color vulnerability in https://github.com/guardian/giant/security/dependabot/2 that's suggesting the vulnerable version is introduced by elastic/charts. But it seems that this vulnerebility is also introduced by d3-scale which is also a sub dependancy of the latest version of elastic/charts. So this change doesn't seem to be fixing the main issue of d3-color vulnerability. But it's still good to have the most recent version

How to test

tested locally

The only change in the UI is that the default number of desired ticks in the Y-Axis from 10 to 5. I left it to be default since it's mentioned in the actual elastic chart PR that this helps a bit more when rendering short charts and will help reduce the clutter. https://github.com/elastic/elastic-charts/pull/2005

before

image

after

image