From bc027dc98119cc0f5b3811cb8414fb98296ee0af Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Tue, 1 Sep 2026 19:27:05 -0400 Subject: [PATCH] ci/github-script/commits.js: unbreak This succeeded before the ESM conversion because we weren't in strict mode (and therefore `line` was added to the global scope). ES Modules run in strict mode by default, so this is a `ReferenceError` now. TypeScript would have caught this! I will keep working on converting to it. (cherry picked from commit 375b60d66bee94ebaaab9dfdc914da46165d899d) --- ci/github-script/commits.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/github-script/commits.js b/ci/github-script/commits.js index f0d5da6c20ed..5a0d46995920 100644 --- a/ci/github-script/commits.js +++ b/ci/github-script/commits.js @@ -290,7 +290,7 @@ export default async ({ github, context, core, dry, cherryPicks }) => { // that's too long. We think this is unlikely to happen, and so don't deal with it explicitly. const truncated = [] let total_length = 0 - for (line of diff) { + for (const line of diff) { total_length += line.length if (total_length > 10000) { truncated.push('', '[...truncated...]')