@bmp/highlight-stack
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -9,3 +9,7 @@ 'use strict' | ||
const NODE_MODULES = 'node_modules/' | ||
const INTERNAL = '(internal/' | ||
const INTERNAL = [ | ||
'(internal/', | ||
'(events.js', | ||
'(_stream', | ||
] | ||
const REGEX = new RegExp(`${CWD}([^:]+):(\\d+):(\\d+)`) | ||
@@ -25,3 +29,3 @@ const REGEX_NODE_MODULES = /((?:@[^/]*\/)?[^/]*)([^:]*)/ | ||
.map(line => { | ||
if (line.includes(INTERNAL)) { | ||
if (INTERNAL.some(str => line.includes(str))) { | ||
return chalk.grey(line) | ||
@@ -28,0 +32,0 @@ } |
{ | ||
"name": "@bmp/highlight-stack", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "highlights the name of local (not in node_modules) files in error stack", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
3600
42