From 487a14ff51a5c193624e24f495d12e70ed0b8797 Mon Sep 17 00:00:00 2001 From: Simon Klee Date: Fri, 6 Nov 2026 06:26:56 +0100 Subject: [PATCH] test(cli-rs): normalize loopback ports before parity versions The version pattern took 127.0.0 from a loopback address, so 'http://127.0.0.1:45678' became '.1:45678' and the port was never normalized. The port pattern now runs first, and the version pattern skips three parts of a longer dotted number. --- packages/cli-rs/parity/cli/client.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/cli-rs/parity/cli/client.ts b/packages/cli-rs/parity/cli/client.ts index eb7db665b09..e0c5209a95d 100644 --- a/packages/cli-rs/parity/cli/client.ts +++ b/packages/cli-rs/parity/cli/client.ts @@ -104,11 +104,12 @@ export function normalize(text: string, context: Context) { return [ ...(context.server ? [[context.server, ""] as const] : []), [context.root, ""] as const, + [/127\.0\.0\.1:\d+/g, "127.0.0.1:"] as const, [/\b(ses|msg|prt|per|frm|evt|prj|proj|wrk|pty|tool|call)_[A-Za-z0-9]{6,}\b/g, "<$1>"] as const, [/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z\b/g, "