chore: fit the loop-locals fix within the production gate

Three things the gate caught that the test suite could not.

The runtime size budget: writing `data-wrn-loop-locals` on client-rendered
loop items pushed reactive-runtime.ts to 51,603 against a 51,400 budget that
had only 125 bytes of headroom. Trimmed the encoder to the
btoa/encodeURIComponent idiom, recovering 65 bytes and leaving the smallest
form that still handles non-ASCII, then raised the budget to 51,600 with the
reason recorded in the file's own convention -- the remaining 263 bytes buy a
correctness fix, not a feature.

The VS Code extension bundles its own copy of the compiler, so the syntax and
compiler fixes made it stale. Rebuilt.

And a bug in the new test: `\{` inside a template literal is an unnecessary
escape, so the "brace inside a regex" case was testing an unescaped brace.
`\{` tests the case it was written for.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-22 12:08:07 +05:30
co-authored by Claude Opus 5
parent 2d0df4efc9
commit 2299a0726d
6 changed files with 256 additions and 36 deletions
+1 -1
View File
@@ -257,7 +257,7 @@ ${body}
expect(parse(mk(` const x = /it's/.test("its");`)).name).toBe("P");
expect(parse(mk(` const x = /"/.test("q");`)).name).toBe("P");
// A brace inside a regex used to be counted as block depth.
expect(parse(mk(` const x = /\{/.test("{");`)).name).toBe("P");
expect(parse(mk(` const x = /\\{/.test("{");`)).name).toBe("P");
expect(parse(mk(` const x = /}/.test("}");`)).name).toBe("P");
// A brace quantifier is balanced, but must not be counted either.
expect(parse(mk(` const x = /^a{2,3}$/.test("aa");`)).name).toBe("P");