From 0d5227ee7777d7d2139be45cb2f53dbe7083d861 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 9 Oct 2026 03:28:58 +0200 Subject: [PATCH] Test a TypeScript module whose tests alone changed A change to a module's tests moves no build (hq ADR 0267), so the planner's modules leave it out; the TypeScript part also reads the modules the changed files are in. --- merge-check-typescript.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/merge-check-typescript.sh b/merge-check-typescript.sh index de5aa5a0..4a66f9da 100644 --- a/merge-check-typescript.sh +++ b/merge-check-typescript.sh @@ -29,12 +29,12 @@ if [ ! -f "$tsc" ]; then exit 1 fi -# The modules the change reaches, as merge-check.sh reads them (hq ADR 0238). -if [ -n "${MESH_CHECK_MODULES:-}" ]; then - touched=$(printf '%s\n' "$MESH_CHECK_MODULES" | tr ',' '\n' | sed -e 's#^modules/##' -e '/\//d' | sort -u) -else - touched=$(printf '%s\n' "${MESH_CHECK_CHANGED:-}" | tr ',' '\n' | sed -n 's#^modules/\([^/]*\)/.*#\1#p' | sort -u) -fi +# The modules the change reaches: the planner's answer (hq ADR 0238), and every module a changed file is in — +# a change to a module's tests alone moves no build (hq ADR 0267), and its tests must still run. +touched=$({ + printf '%s\n' "${MESH_CHECK_MODULES:-}" | tr ',' '\n' | sed -e 's#^modules/##' -e '/\//d' + printf '%s\n' "${MESH_CHECK_CHANGED:-}" | tr ',' '\n' | sed -n 's#^modules/\([^/]*\)/.*#\1#p' +} | sed '/^$/d' | sort -u) work=$(mktemp -d) trap 'rm -rf "$work"' EXIT