diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ace164872a7..fe86bb74c568 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Docs: https://docs.openclaw.ai ### Changes ### Fixes +- Tests: suppress the current Rolldown plugin timing warning format in the Vitest wrapper so tiny focused runs do not drown useful stderr in repeated build-timing noise. - Crabbox: sync clean sparse-checkout remote changed gates from a temporary full checkout with local-only commits overlaid as worktree changes so git-backed script checks can seed the runner repository. - Tests: make startup memory and startup bench smoke scripts build CLI startup artifacts when run from a fresh source checkout. - iMessage: mark authorized slash-command turns as text-sourced commands so `/status`, `/new`, and `/restart` acknowledgements return to the source conversation. (#82642) thanks @homer-byte. diff --git a/scripts/run-vitest.mjs b/scripts/run-vitest.mjs index f4a0ce8e384f..46eb11805671 100644 --- a/scripts/run-vitest.mjs +++ b/scripts/run-vitest.mjs @@ -10,7 +10,9 @@ import { } from "./vitest-process-group.mjs"; const TRUTHY_ENV_VALUES = new Set(["1", "true", "yes", "on"]); -const SUPPRESSED_VITEST_STDERR_PATTERNS = ["[PLUGIN_TIMINGS] Warning:"]; +const ANSI_CSI_PREFIX = `${String.fromCharCode(27)}[`; +const ANSI_CSI_SUFFIX_RE = /^[0-?]*[ -/]*[@-~]/u; +const SUPPRESSED_VITEST_STDERR_PATTERNS = ["[PLUGIN_TIMINGS]"]; const require = createRequire(import.meta.url); function isTruthyEnvValue(value) { @@ -79,7 +81,11 @@ function resolveExplicitVitestWorkerBudget(env) { } export function shouldSuppressVitestStderrLine(line) { - return SUPPRESSED_VITEST_STDERR_PATTERNS.some((pattern) => line.includes(pattern)); + const normalizedLine = line + .split(ANSI_CSI_PREFIX) + .map((segment, index) => (index === 0 ? segment : segment.replace(ANSI_CSI_SUFFIX_RE, ""))) + .join(""); + return SUPPRESSED_VITEST_STDERR_PATTERNS.some((pattern) => normalizedLine.includes(pattern)); } export function resolveDirectNodeVitestArgs(pnpmArgs) { diff --git a/test/scripts/run-vitest.test.ts b/test/scripts/run-vitest.test.ts index 5d7feb23d23a..faf3e0b08fed 100644 --- a/test/scripts/run-vitest.test.ts +++ b/test/scripts/run-vitest.test.ts @@ -132,6 +132,11 @@ describe("scripts/run-vitest", () => { "\u001b[33m[PLUGIN_TIMINGS] Warning:\u001b[0m plugin `foo` was slow\n", ), ).toBe(true); + expect( + shouldSuppressVitestStderrLine( + "\u001b[33m[PLUGIN_TIMINGS] \u001b[0mYour build spent significant time in plugin `externalize-deps`.\n", + ), + ).toBe(true); expect(shouldSuppressVitestStderrLine("real failure output\n")).toBe(false); });