This PR updates to Chart.js 4 and uses a version of chartjs-node-canvas that does not rely on freshRequire and various other bits of aggressive use of require (presumably to isolate plugins) and thereby avoids leaking memory on every chart.
Thus, this PR addresses #188 as far as I can see. At least in manual testing, the memory profiles look clearly different between before and after.
The patch-package tool is useful to work around the issue in the upstream package. So, I am using this for chartjs-chart-boxplot. Though, should keep track of upstream whether the PR gets merged.
This PR updates to Chart.js 4 and uses a version of chartjs-node-canvas that does not rely on
freshRequire
and various other bits of aggressive use of require (presumably to isolate plugins) and thereby avoids leaking memory on every chart.Thus, this PR addresses #188 as far as I can see. At least in manual testing, the memory profiles look clearly different between before and after.
Though, before this PR can be merged, https://github.com/sgratzl/chartjs-chart-boxplot/pull/109 needs to be published, or I need to apply some local patches to allow chartjs-chart-boxplot to work on Node.js.
The PR updates also various other dependencies.