Status Chart: Modernize modules, chart.js 4.4.2 #4460
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In addition to weekly updates, and minor dependency updates including chart.js 4.4.2 (no visible changes), this picks up a major update: octokit/graphql.js#549 . Now that
@octokit/graphql
is ESM (ECMAScript Modules), we need to overhaul how thegather_stats
script imports things. For consistency, this also cleans upstatus_chart
, although it was halfway there already.Back in TypeScript 4.5 (which we picked up in #2348), the extension
.mts
was introduced, to explicitly indicate that ESM is being used for TypeScript, mirroring the.mjs
extension for JavaScript. So I'm renaming our files:gather_stats
:.ts
=>.mts
,.js
=>.mjs
status_chart
:.ts
=>.mts
status_chart.mjs
for the browser.daily_table
,weekly_table
,monthly_table
:.ts
=>.mts
Finally, we need to update how we consume and resolve modules:
"module": "nodenext"
for bothgather_stats
andstatus_chart
."moduleResolution": "nodenext"
.As usual, this contains a "DROP BEFORE MERGING" commit to make the live preview work, which will accumulate merge conflicts.
📉 Live preview: stephantlavavej.github.io/STL/
#4476 updates
.github/workflows/update-status-chart.yml
inmain
for these renames.