From 27adbc2fb59e9fe09cbc1651e77bea90a7e8fceb Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 24 Oct 2022 20:17:49 -0700 Subject: [PATCH] tools: keep Emeriti lists case-insensitive alphabetic The current code does not treat capital and lowercase letters as equivalent. --- tools/find-inactive-collaborators.mjs | 2 +- tools/find-inactive-tsc.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/find-inactive-collaborators.mjs b/tools/find-inactive-collaborators.mjs index 0787c634a1a4c9..f6062b046391fa 100755 --- a/tools/find-inactive-collaborators.mjs +++ b/tools/find-inactive-collaborators.mjs @@ -163,7 +163,7 @@ async function moveCollaboratorToEmeritus(peopleToMove) { const currentLine = `${collaboratorFirstLine}\n${line}\n`; // If textToMove is empty, this still works because when undefined is // used in a comparison with <, the result is always false. - while (textToMove[0] < currentLine) { + while (textToMove[0]?.toLowerCase() < currentLine.toLowerCase()) { fileContents += textToMove.shift(); } fileContents += currentLine; diff --git a/tools/find-inactive-tsc.mjs b/tools/find-inactive-tsc.mjs index fe204d5b673e59..5fc31bc745dc80 100755 --- a/tools/find-inactive-tsc.mjs +++ b/tools/find-inactive-tsc.mjs @@ -198,7 +198,7 @@ async function moveTscToEmeritus(peopleToMove) { const currentLine = `${memberFirstLine}\n${line}\n`; // If textToMove is empty, this still works because when undefined is // used in a comparison with <, the result is always false. - while (textToMove[0] < currentLine) { + while (textToMove[0]?.toLowerCase() < currentLine.toLowerCase()) { fileContents += textToMove.shift(); } fileContents += currentLine;