From c3c7c449d86552c22ae1eba90c10ba26129a9e5c Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 20 Jul 2022 07:46:34 -0700 Subject: [PATCH 1/2] tools: add verbose flag to inactive TSC finder Refs: https://github.com/nodejs/node/pull/43897#issuecomment-1189682369 --- tools/find-inactive-tsc.mjs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/find-inactive-tsc.mjs b/tools/find-inactive-tsc.mjs index 5c4c37038988b0..f6b36e88a8b44f 100755 --- a/tools/find-inactive-tsc.mjs +++ b/tools/find-inactive-tsc.mjs @@ -12,8 +12,15 @@ import cp from 'node:child_process'; import fs from 'node:fs'; import path from 'node:path'; import readline from 'node:readline'; +import { parseArgs } from 'node:util'; -const SINCE = process.argv[2] || '3 months ago'; +const args = parseArgs({ + allowPositionals: true, + options: { verbose: { type: 'boolean', short: 'v' } } +}); + +const verbose = args.values.verbose; +const SINCE = args.positionals[0] || '3 months ago'; async function runGitCommand(cmd, options = {}) { const childProcess = cp.spawn('/bin/sh', ['-c', cmd], { @@ -271,3 +278,8 @@ if (inactive.length) { fs.writeFileSync(new URL('../README.md', import.meta.url), newReadmeText); } } + +if (verbose) { + console.log(attendance); + console.log(votingRecords); +} \ No newline at end of file From d50edace8986864354d2527366531cfc7dc8e12a Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 20 Jul 2022 08:27:57 -0700 Subject: [PATCH 2/2] Update tools/find-inactive-tsc.mjs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Michaƫl Zasso --- tools/find-inactive-tsc.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/find-inactive-tsc.mjs b/tools/find-inactive-tsc.mjs index f6b36e88a8b44f..fe204d5b673e59 100755 --- a/tools/find-inactive-tsc.mjs +++ b/tools/find-inactive-tsc.mjs @@ -282,4 +282,4 @@ if (inactive.length) { if (verbose) { console.log(attendance); console.log(votingRecords); -} \ No newline at end of file +}