From 9a6ea87b0c555a2e2e08a8df3892a3650025f72d Mon Sep 17 00:00:00 2001 From: Avare Kodcu Date: Tue, 23 May 2023 13:15:02 +0300 Subject: [PATCH] Change node.js 16.6.0 dependency that Array.prototype.at --- src/bin/tools/trimIndent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/tools/trimIndent.ts b/src/bin/tools/trimIndent.ts index 7ebafb7a..ed486e50 100644 --- a/src/bin/tools/trimIndent.ts +++ b/src/bin/tools/trimIndent.ts @@ -9,7 +9,7 @@ function populateTemplate(strings: TemplateStringsArray, ...args: unknown[]) { if (strings[i]) { chunks.push(strings[i]); // remember last indent of the string portion - lastStringLineLength = strings[i].split("\n").at(-1)?.length ?? 0; + lastStringLineLength = strings[i].split("\n").slice(-1)[0]?.length ?? 0; } if (args[i]) { // if the interpolation value has newlines, indent the interpolation values