QA: syntax gate in every run.sh mode (node --check on every server and public script) after LinkSpin's /traffic-guide shipped with a parse error
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,19 @@ stop_local() { # $1 = port
|
|||||||
rm -rf "$TMP-$1"
|
rm -rf "$TMP-$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Syntax gate, every mode (2026-10-29): LinkSpin's /traffic-guide shipped with a parse error in its page script (a // comment
|
||||||
|
# inside a one-liner) and rendered empty for everyone for a day. node --check costs nothing and catches it before any walk.
|
||||||
|
syntax_gate() {
|
||||||
|
local bad=0 f
|
||||||
|
for f in *.js lib/*.js public/*.js public/assets/*.js; do
|
||||||
|
[ -f "$f" ] || continue
|
||||||
|
node --check "$f" 2>"$OUT/syntax.err" || { echo "[bug] SYNTAX $f :: $(grep -m1 -E 'Error' "$OUT/syntax.err")"; bad=1; }
|
||||||
|
done
|
||||||
|
rm -f "$OUT/syntax.err"
|
||||||
|
[ "$bad" = 0 ] && echo "syntax gate: every script parses" || status=1
|
||||||
|
}
|
||||||
|
syntax_gate
|
||||||
|
|
||||||
if [ "$MODE" = "public" ]; then
|
if [ "$MODE" = "public" ]; then
|
||||||
node qa/walk.mjs public || status=1
|
node qa/walk.mjs public || status=1
|
||||||
node qa/chatbot-sync.mjs || status=1
|
node qa/chatbot-sync.mjs || status=1
|
||||||
|
|||||||
Reference in New Issue
Block a user