-
Notifications
You must be signed in to change notification settings - Fork 37
Upgrade yarn packages with CVEs #221
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
Conversation
@@ -70,7 +70,7 @@ export const createOptions = ({ plot, width }: CreateOptionsProps): Options => { | |||
width: width, | |||
height: 250, | |||
cursor: { sync: { key: sync.key } }, | |||
legend: { live: false }, | |||
legend: { live: true }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's been a change in the newest version related to how the legend is handled. In order to have it visible on hover, we need this option set to true
.
globalStyle('.u-legend', { | ||
height: '55px', | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the legends are now dynamic on hover, it's possible that it breaks into tw lines, so having more height here enables support for smaller windows without pushing the content on the page.
Screen.Recording.2025-07-15.at.2.21.05.PM.mov
const handleRemoveTimeLegend = (uplot: uPlot) => { | ||
const legendTable = uplot.root.querySelector('.u-legend') | ||
if (legendTable) { | ||
const firstRow = legendTable.querySelector('tr') | ||
if (firstRow) { | ||
firstRow.style.display = 'none' | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, the newest version of uplot
includes a time
legend. I've decided to remove it via the ready
hook to keep the UI as close as possible to the previous version.
@@ -36,7 +36,7 @@ | |||
"eslint-plugin-prettier": "^5.0.1", | |||
"rollup-plugin-visualizer": "^5.9.2", | |||
"sass": "^1.65.1", | |||
"vite": "^4.4.11", | |||
"vite": "^4.5.14", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vite
also contains multiple CVEs as reported in:
GHSA-vg6x-rcgg-rjx6
GHSA-92r3-m2mg-pj97
GHSA-356w-63v5-8wf4
GHSA-859w-5945-r5v3
GHSA-8jhw-289h-jh2g
GHSA-9cwx-2883-4wfx
GHSA-x574-m823-4x7w
GHSA-4r4m-qw57-chr8
GHSA-xcj6-pq6g-qj4x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome stuff! 🙌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is fantastic!
It seems that the new version does not take into account the desktop default dark mode setting. That is, if the user's preferred mode is dark mode, it will still start in light mode. You can then switch. (I tried with several browsers)
Is there a way to make it take into account the default dark mode setting like before?
@szkiba Good catch! I noticed this behaviour in the older version as well. However, I've added a fix to address that problem going forward 5bf7d79
Screen.Recording.2025-07-16.at.2.08.04.PM.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What?
This PR upgrades packages that contain CVEs as reported in #214.
Most of the packages are related to transitive dependencies from
uplot
andlerna
. Upgradinguplot
to a patched version required some code changes, as the newest one contains changes on how the legends in the charts are rendered.Screen.Recording.2025-07-15.at.2.12.26.PM.mov
Before this change:
After this change:
Why?
Direct and indirect dependencies have CVEs.
Checklist
mage lint
) and all checks pass.mage test
) and all tests pass.Related PR(s)/Issue(s)
#214