From 7ef314791ce50203ac23ac62185d5d2d5d9a8c5b Mon Sep 17 00:00:00 2001 From: Andrew Antes Date: Fri, 6 Sep 2024 14:43:25 -0400 Subject: [PATCH 1/3] Check for inputSourceMap existing before regex execution --- support-utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support-utils.js b/support-utils.js index efa2c84a..9a3bbb41 100644 --- a/support-utils.js +++ b/support-utils.js @@ -137,8 +137,9 @@ const filterSupportFilesFromCoverage = ( function fixSourcePaths(coverage) { Object.values(coverage).forEach((file) => { const { path: absolutePath, inputSourceMap } = file + if (!absolutePath) return const fileName = /([^\/\\]+)$/.exec(absolutePath)[1] - if (!inputSourceMap || !fileName) return + if (!fileName) return if (inputSourceMap.sourceRoot) inputSourceMap.sourceRoot = '' inputSourceMap.sources = inputSourceMap.sources.map((source) => From f5be516a021dc0998290fc3cada31bc5e1ba5985 Mon Sep 17 00:00:00 2001 From: Andrew Antes Date: Fri, 6 Sep 2024 14:44:31 -0400 Subject: [PATCH 2/3] Typo - incorrect variable name. Updating --- support-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support-utils.js b/support-utils.js index 9a3bbb41..6007c5cc 100644 --- a/support-utils.js +++ b/support-utils.js @@ -137,7 +137,7 @@ const filterSupportFilesFromCoverage = ( function fixSourcePaths(coverage) { Object.values(coverage).forEach((file) => { const { path: absolutePath, inputSourceMap } = file - if (!absolutePath) return + if (!inputSourceMap) return const fileName = /([^\/\\]+)$/.exec(absolutePath)[1] if (!fileName) return From 27adbc24f822674927859f503f48e5db38b403f1 Mon Sep 17 00:00:00 2001 From: Jennifer Shehane Date: Mon, 16 Sep 2024 11:40:40 -0400 Subject: [PATCH 3/3] fix: improve perf for inputSourceMap