From e963558ffa7cffc24bb15359dac60fe3f3cbf892 Mon Sep 17 00:00:00 2001 From: Christian Nitschkowski Date: Thu, 9 Oct 2025 10:13:44 +0200 Subject: [PATCH] Fix BROWSER_PATH_REGEX The regex could not properly capture pathes on Windows filesystems. The regex only captured the path up to the drive letter. --- src/BaseLogger.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BaseLogger.ts b/src/BaseLogger.ts index 8a7f937..b6597d3 100644 --- a/src/BaseLogger.ts +++ b/src/BaseLogger.ts @@ -707,7 +707,7 @@ type RuntimeMeta = IMeta & { browser?: string; }; -const BROWSER_PATH_REGEX = /(?:(?:file|https?|global code|[^@]+)@)?(?:file:)?((?:\/[^:/]+){2,})(?::(\d+))?(?::(\d+))?/; +const BROWSER_PATH_REGEX = /(?:(?:https?|file|global code):\/\/[^\s)]+\/)?((?:\/|[A-Za-z]:\/)[^:\s)]+?\.\w+(?:\?\S+)?):(\d+):(\d+)/; const runtime = createLoggerEnvironment();