diff --git a/lib/source.js b/lib/source.js index c4233e63..e573d1b4 100644 --- a/lib/source.js +++ b/lib/source.js @@ -206,10 +206,10 @@ function originalPositionTryBoth (sourceMap, line, column) { return original } -// Not required since Node 13, see: https://github.com/nodejs/node/pull/27375 -const isPrerNode13 = /^v1[0-2]\./u.test(process.version) +// Not required since Node 12, see: https://github.com/nodejs/node/pull/27375 +const isPreNode12 = /^v1[0-1]\./u.test(process.version) function getShebangLength (source) { - if (isPrerNode13 && source.indexOf('#!') === 0) { + if (isPreNode12 && source.indexOf('#!') === 0) { const match = source.match(/(?#!.*)/) if (match) { return match.groups.shebang.length diff --git a/test/fixtures/shebang.js b/test/fixtures/shebang.js index 124f2e57..63355def 100644 --- a/test/fixtures/shebang.js +++ b/test/fixtures/shebang.js @@ -1,6 +1,6 @@ module.exports = { describe: 'shebang', - maxNodeVersion: 'v13.0.0', + maxNodeVersion: 'v12.0.0', coverageV8: { "scriptId": "56", "url": "./test/fixtures/scripts/shebang.js",