From 4ca72207532b1f2d848d326c3fc7f50b13f03043 Mon Sep 17 00:00:00 2001 From: bcoe Date: Sun, 23 Jun 2019 19:01:30 -0700 Subject: [PATCH] fix: regex for detecting Node < 10.16 was off --- lib/v8-to-istanbul.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/v8-to-istanbul.js b/lib/v8-to-istanbul.js index f09347c0..335f5c25 100644 --- a/lib/v8-to-istanbul.js +++ b/lib/v8-to-istanbul.js @@ -8,7 +8,7 @@ const CovSource = require('./source') const { readFileSync } = require('fs') const { SourceMapConsumer } = require('source-map') -const isOlderNode10 = /^v10\.[0-5]/u.test(process.version) +const isOlderNode10 = /^v10\.(([0-9]\.)|(1[0-5]\.))/u.test(process.version) // Injected when Node.js is loading script into isolate pre Node 10.16.x. // see: https://github.com/nodejs/node/pull/21573.