DEV: Update chart.js from 2.9.3 to 2.9.4 (PR #13026)

Release notes: Release v2.9.4 · chartjs/Chart.js · GitHub

GitHub

Should the fallback at discourse/Chart.min.js at master · discourse/discourse · GitHub also be updated? I guess this is a question for @jbrw.

Hm, bin/rails javascript:update doesn’t do that on its own. It doesn’t remove the old file either, I did that manually in this PR.

Normally I’d say the task should be updated, but it might be phased out soon, when we move production builds to Ember CLI.

I think the intention was to keep the two most recent versions to avoid theoretical race conditions if you’re using the site as new JS is deployed.

clean_up is called before an update, and will only retain the most recent versions of libraries. update will then install any new versions in addition to the previous versions.

The fallback file isn’t updated. Theoretically it shouldn’t be accessed directly, and the intention was to remove it entirely. However, I can see there are a handful of requests to javascripts/Chart.min.js on production servers so we would need to resolve that before removing that file.

The title of this pull request changed from “Update chart.js from 2.9.3 to 2.9.4” to "DEV: Update chart.js from 2.9.3 to 2.9.4

However, I can see there are a handful of requests to javascripts/Chart.min.js on production servers so we would need to resolve that before removing that file.

After a brief code spelunking I can say I have no idea what might be requesting the fallback file. :sweat_smile: