From f25618ad5f220a505b137f213ec4de965dc0eb5c Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 26 Dec 2024 16:58:38 +0200 Subject: [PATCH] Fix running on Windows (#4) --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c5641bf..10358c7 100644 --- a/index.js +++ b/index.js @@ -47,7 +47,7 @@ module.exports = async function* coberturaReporter(source) { const classes = files.map(f => { const relativePath = path.relative(workingDirectory, f.path); const dirname = path.dirname(relativePath); - const withReplacesSep = dirname.replace(new RegExp(path.sep, 'g'), '.'); + const withReplacesSep = dirname.replaceAll(path.sep, '.'); const branchesByLine = f.branches.reduce((acc, b) => { if (!acc[b.line]) {