istanbul-lib-instrument
Advanced tools
Comparing version 5.2.0 to 5.2.1
@@ -6,2 +6,9 @@ # Change Log | ||
## [5.2.1](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument-v5.2.0...istanbul-lib-instrument-v5.2.1) (2022-10-05) | ||
### Bug Fixes | ||
* handle error when inputSourceMap is not a plain object ([#662](https://github.com/istanbuljs/istanbuljs/issues/662)) ([3e3611f](https://github.com/istanbuljs/istanbuljs/commit/3e3611f0efffefd5f87e6cbccd840e9f33aaf43e)) | ||
## [5.2.0](https://github.com/istanbuljs/istanbuljs/compare/istanbul-lib-instrument-v5.1.0...istanbul-lib-instrument-v5.2.0) (2022-02-21) | ||
@@ -8,0 +15,0 @@ |
{ | ||
"name": "istanbul-lib-instrument", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"description": "Core istanbul API for JS code coverage", | ||
@@ -5,0 +5,0 @@ "author": "Krishnan Anantheswaran <kananthmail-github@yahoo.com>", |
@@ -28,2 +28,4 @@ /* | ||
* @param {array} [opts.parserPlugins] - set babel parser plugins, see @istanbuljs/schema for defaults. | ||
* @param {string} [opts.coverageGlobalScope=this] the global coverage variable scope. | ||
* @param {boolean} [opts.coverageGlobalScopeFunc=true] use an evaluated function to find coverageGlobalScope. | ||
*/ | ||
@@ -30,0 +32,0 @@ class Instrumenter { |
@@ -788,2 +788,11 @@ const { createHash } = require('crypto'); | ||
coverageData.hash = hash; | ||
if ( | ||
coverageData.inputSourceMap && | ||
Object.getPrototypeOf(coverageData.inputSourceMap) !== | ||
Object.prototype | ||
) { | ||
coverageData.inputSourceMap = { | ||
...coverageData.inputSourceMap | ||
}; | ||
} | ||
const coverageNode = T.valueToNode(coverageData); | ||
@@ -790,0 +799,0 @@ delete coverageData[MAGIC_KEY]; |
70197
1168