v8-to-istanbul
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="2.0.2"></a> | ||
## [2.0.2](https://github.com/bcoe/v8-to-istanbul/compare/v2.0.1...v2.0.2) (2019-01-20) | ||
### Bug Fixes | ||
* windows has \r\n line separator ([#11](https://github.com/bcoe/v8-to-istanbul/issues/11)) ([c10b888](https://github.com/bcoe/v8-to-istanbul/commit/c10b888)) | ||
<a name="2.0.1"></a> | ||
@@ -7,0 +17,0 @@ ## [2.0.1](https://github.com/bcoe/v8-to-istanbul/compare/v2.0.0...v2.0.1) (2019-01-20) |
@@ -11,2 +11,4 @@ const assert = require('assert') | ||
const isWindows = process.platform === 'win32' | ||
module.exports = class CovScript { | ||
@@ -27,6 +29,7 @@ constructor (scriptPath, wrapperLength) { | ||
let position = 0 | ||
source.split('\n').forEach((lineStr, i) => { | ||
const separator = isWindows ? '\r\n' : '\n' | ||
source.split(separator).forEach((lineStr, i) => { | ||
this.eof = position + lineStr.length | ||
lines.push(new CovLine(i + 1, position, this.eof)) | ||
position += lineStr.length + 1 // also add the \n. | ||
position += lineStr.length + separator.length | ||
}) | ||
@@ -33,0 +36,0 @@ } |
{ | ||
"name": "v8-to-istanbul", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "convert from v8 coverage format to istanbul's format", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
35162
1137