gstack/browse/scripts
shlim ee24bfc32d fix(build): escape literal braces in bun:sqlite stub regex
The Node server bundle post-processing in build-node-server.sh uses a
Perl substitution with an unescaped literal `{` in the pattern
`import { Database } from "bun:sqlite";`. Perl treats an unescaped `{`
that is not part of a valid quantifier as an error ("Unescaped left
brace in regex is illegal here in regex"), hard-failing the build with
exit code 255 and breaking `./setup`.

Reproduced on Windows Git Bash (msys Perl 5.26.2); also affects modern
Perl 5.32+ on Linux. Escaping the braces (`\{ \}`) matches them
literally and is backward compatible; verified the substitution still
produces the expected `const Database = null` stub and `node --check`
passes on the resulting server-node.mjs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 01:27:54 +09:00
..
build-node-server.sh fix(build): escape literal braces in bun:sqlite stub regex 2026-06-26 01:27:54 +09:00