diff --git a/.github/workflows/audits.yml b/.github/workflows/audits.yml index b6df9eb7..b29f91f8 100644 --- a/.github/workflows/audits.yml +++ b/.github/workflows/audits.yml @@ -170,7 +170,7 @@ jobs: with: name: audit-reports - name: Render servers table - run: yarn tsx scripts/render-servers-table.ts + run: node scripts/render-servers-table.mjs - name: Diff run: git diff --minimal - name: Commit diff --git a/scripts/render-servers-table.ts b/scripts/render-servers-table.mjs similarity index 86% rename from scripts/render-servers-table.ts rename to scripts/render-servers-table.mjs index 87442bb6..c0bf17d4 100644 --- a/scripts/render-servers-table.ts +++ b/scripts/render-servers-table.mjs @@ -23,12 +23,14 @@ main().catch((err) => { process.exit(1); }); -async function renderTable(implsDir: string) { +/** @param {string} implsDir */ +async function renderTable(implsDir) { let out = ` | Name | Audit | |------|-------|`; for (const implDir of (await fs.readdir(implsDir)).sort()) { - const report: { error: number } = JSON.parse( + /** @type {{ error: number }} */ + const report = JSON.parse( ( await fs.readFile(path.join(implsDir, implDir, 'report.json')) ).toString(), @@ -37,7 +39,8 @@ async function renderTable(implsDir: string) { continue; } - const pkg: Record = JSON.parse( + /** @type {Record} */ + const pkg = JSON.parse( ( await fs.readFile(path.join(implsDir, implDir, 'package.json')) ).toString(),