From ac93fbfad01ecd99f818d9964463afb6c35a8f4a Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sat, 5 Sep 2026 00:25:45 -0700 Subject: [PATCH] test(relay): keep the stage slug helper private (#9998) --- infra/relay/src/deploymentConfig.test.ts | 7 ------- infra/relay/src/deploymentConfig.ts | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/infra/relay/src/deploymentConfig.test.ts b/infra/relay/src/deploymentConfig.test.ts index 44c7627a4dafbc9c22d41f093aea811347a72064..f090c70ee22b5540d3a6748baf238e450bb177ce 100644 --- a/infra/relay/src/deploymentConfig.test.ts +++ b/infra/relay/src/deploymentConfig.test.ts @@ -11,17 +11,10 @@ import { RelayPublicDomainLabelTooLongError, relayPublicDomainForStage, relayResourceNameForStage, - relayStageSlug, } from "./deploymentConfig.ts"; const isRelayPublicDomainLabelTooLongError = Schema.is(RelayPublicDomainLabelTooLongError); -describe("relayStageSlug", () => { - it("matches Alchemy physical-name sanitization for default developer stages", () => { - expect(relayStageSlug("dev_julius")).toBe("dev-julius"); - }); -}); - describe("relayPublicDomainForStage", () => { it("uses the canonical relay hostname for production", () => { expect(relayPublicDomainForStage("prod", ".example.com.")).toBe("relay.example.com"); diff --git a/infra/relay/src/deploymentConfig.ts b/infra/relay/src/deploymentConfig.ts index fe9d37b2998801821044c55519749296b82ecab3..565e16422dd294c89a9f82536be5153d17ae5f4a 100644 --- a/infra/relay/src/deploymentConfig.ts +++ b/infra/relay/src/deploymentConfig.ts @@ -56,7 +56,7 @@ function appendDnsSafeSuffix(prefix: string, suffix: string): string { * Alchemy's physical-name helper sanitizes resource names after adding the * stage. Keep custom domains and runtime-created resources aligned with it. */ -export function relayStageSlug(stage: string): string { +function relayStageSlug(stage: string): string { return stage .toLowerCase() .replaceAll(/[^a-z0-9-]/g, "-") -- 2.54.0