From e8d75a39bc22b2f5a9537568a5161aee4d477297 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 9 Jan 2026 16:48:57 +0100 Subject: [PATCH] ci: drop output sanitize wrapper --- .github/workflows/ci.yml | 4 ++-- scripts/ci-sanitize-output.mjs | 37 ---------------------------------- 2 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 scripts/ci-sanitize-output.mjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 28a2739b5..1922b98e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: command: pnpm lint - runtime: node task: test - command: node scripts/ci-sanitize-output.mjs pnpm test + command: pnpm test - runtime: node task: build command: pnpm build @@ -104,7 +104,7 @@ jobs: command: pnpm lint - runtime: node task: test - command: node scripts/ci-sanitize-output.mjs pnpm test + command: pnpm test - runtime: node task: build command: pnpm build diff --git a/scripts/ci-sanitize-output.mjs b/scripts/ci-sanitize-output.mjs deleted file mode 100644 index 9c9b12012..000000000 --- a/scripts/ci-sanitize-output.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import { spawn } from "node:child_process"; - -function sanitizeBuffer(input) { - const out = Buffer.allocUnsafe(input.length); - for (let i = 0; i < input.length; i++) { - const b = input[i]; - // Keep: tab/newline/carriage return + printable ASCII; replace everything else. - out[i] = b === 9 || b === 10 || b === 13 || (b >= 32 && b <= 126) ? b : 63; - } - return out; -} - -const [command, ...args] = process.argv.slice(2); -if (!command) { - process.stderr.write( - "Usage: node scripts/ci-sanitize-output.mjs [args...]\n", - ); - process.exit(2); -} - -const child = spawn(command, args, { - stdio: ["ignore", "pipe", "pipe"], - shell: process.platform === "win32", -}); - -child.stdout.on("data", (chunk) => { - process.stdout.write(sanitizeBuffer(Buffer.from(chunk))); -}); - -child.stderr.on("data", (chunk) => { - process.stderr.write(sanitizeBuffer(Buffer.from(chunk))); -}); - -child.on("exit", (code, signal) => { - if (signal) process.exit(1); - process.exit(code ?? 1); -});