From d761fdee3b2aae658a5e06d649aaa981ac8bcec3 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 27 Oct 2022 21:21:20 -0700 Subject: [PATCH] tools: keep Emeriti lists case-insensitive alphabetic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The current code does not treat capital and lowercase letters as equivalent. PR-URL: https://github.com/nodejs/node/pull/45159 Reviewed-By: Michaƫl Zasso Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: James M Snell --- 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;