Skip to content

Commit

Permalink
Merge c38a056 into 2b39d58
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Jun 24, 2019
2 parents 2b39d58 + c38a056 commit 2281ffb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/v8-to-istanbul.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ const CovSource = require('./source')
const { readFileSync } = require('fs')
const { SourceMapConsumer } = require('source-map')

const isNode10 = !!process.version.match(/^v10/)
const isOlderNode10 = /^v10\.[0-5]/u.test(process.version)

// Injected when Node.js is loading script into isolate pre Node 11.
// Injected when Node.js is loading script into isolate pre Node 10.16.x.
// see: https://github.com/nodejs/node/pull/21573.
const cjsWrapperLength = isNode10 ? require('module').wrapper[0].length : 0
const cjsWrapperLength = isOlderNode10 ? require('module').wrapper[0].length : 0

module.exports = class V8ToIstanbul {
constructor (scriptPath, wrapperLength, sources) {
Expand Down

0 comments on commit 2281ffb

Please sign in to comment.