From 2b3a67d43c86a1f993d232c2794187611c30d5b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 14 Aug 2026 02:34:40 +0200 Subject: [PATCH] Keep the leaf-guard regexes inside the compiler's target --- src/__tests__/api-errors-leaf-guard.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/__tests__/api-errors-leaf-guard.test.ts b/src/__tests__/api-errors-leaf-guard.test.ts index 053e9c46d..871c2d17f 100644 --- a/src/__tests__/api-errors-leaf-guard.test.ts +++ b/src/__tests__/api-errors-leaf-guard.test.ts @@ -48,7 +48,7 @@ describe("api-errors leaf module", () => { join(SRC, "lib/sharing/record-session-fence.ts"), "utf8", ); - const imports = source.match(/^import[^;]+from "@\/lib\/api-handler";/gms); + const imports = source.match(/^import[^;]+from "@\/lib\/api-handler";/gm); for (const statement of imports ?? []) { expect( statement.startsWith("import type"), @@ -59,7 +59,7 @@ describe("api-errors leaf module", () => { it("the leaf imports nothing but the fence contract", () => { const source = readFileSync(join(SRC, "lib/api-errors.ts"), "utf8"); - const imports = source.match(/^import[^;]+;/gms) ?? []; + const imports = source.match(/^import[^;]+;/gm) ?? []; // Self-check: the walker found the one expected import. expect(imports.length).toBeGreaterThan(0); for (const statement of imports) {