From 7e8b4afb45e4f55699cdf98145c030d44b0b30a3 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Fri, 15 Mar 2024 23:22:08 -0700 Subject: [PATCH] Status Chart: Modernize modules, chart.js 4.4.2 (#4460) --- .github/workflows/compile-typescript.yml | 4 +- .gitignore | 2 +- README.md | 6 +- index.html | 2 +- package-lock.json | 324 ++++++++---------- package.json | 16 +- src/{daily_table.ts => daily_table.mts} | 0 src/{monthly_table.ts => monthly_table.mts} | 0 src/{status_chart.ts => status_chart.mts} | 6 +- src/tsconfig.json | 3 +- src/{weekly_table.ts => weekly_table.mts} | 3 + .../{gather_stats.ts => gather_stats.mts} | 4 +- src_gather/tsconfig.json | 5 +- tsconfig.universal.json | 2 +- 14 files changed, 178 insertions(+), 199 deletions(-) rename src/{daily_table.ts => daily_table.mts} (100%) rename src/{monthly_table.ts => monthly_table.mts} (100%) rename src/{status_chart.ts => status_chart.mts} (96%) rename src/{weekly_table.ts => weekly_table.mts} (97%) rename src_gather/{gather_stats.ts => gather_stats.mts} (96%) diff --git a/.github/workflows/compile-typescript.yml b/.github/workflows/compile-typescript.yml index ef2aa179ed..c91899e6e2 100644 --- a/.github/workflows/compile-typescript.yml +++ b/.github/workflows/compile-typescript.yml @@ -20,9 +20,9 @@ jobs: - name: Install Packages run: | npm ci - - name: Compile gather_stats.ts + - name: Compile gather_stats.mts run: | npx tsc --noEmit -p src_gather/tsconfig.json - - name: Compile status_chart.ts + - name: Compile status_chart.mts run: | npx tsc -p src/tsconfig.json diff --git a/.gitignore b/.gitignore index 4f377a92e4..6cdd2ebbb8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ .vscode/ # Ignore the TypeScript compiler's output. -/built/gather_stats.js +/built/gather_stats.mjs # Ignore installed packages. /node_modules/ diff --git a/README.md b/README.md index 3375895a67..9f77d6f1d3 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ it'll update `package.json` and `package-lock.json` accordingly. `git add` and ` as `dependencies` in `package.json` (e.g. `@octokit/graphql@latest dotenv@latest`). + Ensure that the `importmap` in `index.html` remains synchronized to the same versions. * Update other dependencies in `index.html` (e.g. Primer CSS). -* Update `weekly_table.ts` by adding a new row. +* Update `weekly_table.mts` by adding a new row. + We update it every Friday, although nothing bad will happen if we skip a week or update it on a different day. + `vso` is the number of Active work items under the STL's Area Path. + `libcxx` is the number of skipped/failing tests in `tests/libcxx/expected_results.txt`, excluding @@ -85,14 +85,14 @@ it'll update `package.json` and `package-lock.json` accordingly. `git add` and ` ``` python tools/count_libcxx.py STL_REPO/tests/libcxx/expected_results.txt ``` -* Run `npm run gather` to compile `gather_stats.ts` and then regenerate `daily_table.ts` and `monthly_table.ts`. +* Run `npm run gather` to compile `gather_stats.mts` and then regenerate `daily_table.mts` and `monthly_table.mts`. + This regenerates the files from scratch, but the diff should be small because the data is stable and the process is deterministic. + It's possible for previous values to change, e.g. if an issue is relabeled, but dramatic changes without corresponding generator changes should be investigated. + Automated updates (controlled by `.github/workflows/update-status-chart.yml` in the main repo) will regenerate these files, so you generally don't need to manually update them in PRs. -* Run `npm run make` to compile `status_chart.ts` and then bundle it and the tables into `built/status_chart.mjs`. +* Run `npm run make` to compile `status_chart.mts` and then bundle it and the tables into `built/status_chart.mjs`. + Automated updates will also regenerate this file. However, you'll need to manually update `built/status_chart.mjs` if you're making synchronized changes to `index.html`. * Run `npm run view` to preview your changes locally. diff --git a/index.html b/index.html index cf13c0bd45..d4a041064a 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@