From 690a7b53a72ac71f9f76260fa50c634566c4e984 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 28 Nov 2022 23:25:05 -0400 Subject: divide things.js into modular files (hilariously) --- src/util/sugar.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/util/sugar.js') diff --git a/src/util/sugar.js b/src/util/sugar.js index 808a7e1c..e8fdf932 100644 --- a/src/util/sugar.js +++ b/src/util/sugar.js @@ -405,7 +405,7 @@ export function _withAggregate(mode, aggregateOpts, fn) { } export function showAggregate(topError, { - pathToFile = (p) => p, + pathToFileURL = f => f, showTraces = true, } = {}) { const recursive = (error, {level}) => { @@ -429,9 +429,7 @@ export function showAggregate(topError, { ? '- ' + stackLine .trim() - .replace(/file:\/\/(.*\.js)/, (match, pathname) => - pathToFile(pathname) - ) + .replace(/file:\/\/.*\.js/, (match) => pathToFileURL(match)) : '(no stack trace)'; header += ` ${color.dim(tracePart)}`; } -- cgit 1.3.0-6-gf8a5