monocart-coverage-reports
Advanced tools
Comparing version 2.11.4 to 2.11.5
@@ -20,3 +20,3 @@ const fs = require('fs'); | ||
} | ||
return JSON.parse(content); | ||
return Util.jsonParse(content); | ||
} | ||
@@ -35,3 +35,3 @@ | ||
if (typeof content === 'string') { | ||
return JSON.parse(content); | ||
return Util.jsonParse(content); | ||
} | ||
@@ -38,0 +38,0 @@ |
@@ -405,2 +405,26 @@ const Util = { | ||
jsonParse: function(str) { | ||
if (typeof str !== 'string') { | ||
return null; | ||
} | ||
if (!str) { | ||
return null; | ||
} | ||
let json = null; | ||
// remove BOM \ufeff | ||
// str = str.replace(/^\uFEFF/, ''); | ||
try { | ||
json = JSON.parse(str); | ||
} catch (e) { | ||
// console.log(e); | ||
} | ||
return json; | ||
}, | ||
// ============================================================================= | ||
@@ -407,0 +431,0 @@ // formatter |
{ | ||
"name": "monocart-coverage-reports", | ||
"version": "2.11.4", | ||
"version": "2.11.5", | ||
"description": "A code coverage tool to generate native V8 reports or Istanbul reports.", | ||
@@ -93,3 +93,2 @@ "main": "./lib/index.js", | ||
"devDependencies": { | ||
"@bcoe/v8-coverage": "^0.2.3", | ||
"@jridgewell/sourcemap-codec": "^1.5.0", | ||
@@ -100,3 +99,3 @@ "async-tick": "^1.0.0", | ||
"esbuild": "^0.24.0", | ||
"eslint": "~9.16.0", | ||
"eslint": "~9.17.0", | ||
"eslint-config-plus": "^2.0.2", | ||
@@ -113,3 +112,3 @@ "eslint-plugin-html": "^8.1.2", | ||
"starfall-cli": "^2.0.20", | ||
"stylelint": "^16.11.0", | ||
"stylelint": "^16.12.0", | ||
"stylelint-config-plus": "^1.1.3", | ||
@@ -116,0 +115,0 @@ "supports-color": "^9.4.0", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1013318
25
12111