From 0594ce02a1ed99aca000a20c3946f316929f2c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20R=C3=A4ntil=C3=A4?= Date: Sat, 29 Jun 2019 11:21:13 +0200 Subject: [PATCH] fix(compat): Fixed compatibility for Node.js < 12 --- .travis.yml | 2 -- package.json | 2 +- register.spec.js | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 93efc7b..bb9cdc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,8 +10,6 @@ node_js: - '10' - '9' - '8' - - '7' - - '6' after_success: - npm run travis-deploy-once "npm run semantic-release" branches: diff --git a/package.json b/package.json index 858f983..e3ceb7c 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "main": "./index.js", "types": "./index.d.ts", "engines": { - "node": ">=6" + "node": ">=8" }, "files": [ "index.js", diff --git a/register.spec.js b/register.spec.js index 3792b33..bec069e 100644 --- a/register.spec.js +++ b/register.spec.js @@ -27,7 +27,7 @@ function splitLines( lines ) function cutColumn( line ) { - const m = line.match( /(.*:\d+):\d+$/ ); + const m = line.match( /(.*:\d+):\d+\)?$/ ); if ( !m ) return line; return m[ 1 ]; @@ -35,7 +35,7 @@ function cutColumn( line ) function cutLocation( line ) { - const m = line.match( /(.*):\d+:\d+$/ ); + const m = line.match( /(.*):\d+:\d+\)?$/ ); if ( !m ) return line; return m[ 1 ];