Compare commits

...

2 Commits
master ... main

@ -28,7 +28,6 @@
"create-error": "^0.3.1",
"default-value": "^1.0.0",
"execall": "^2.0.0",
"flatten": "^1.0.3",
"indent-string": "^4.0.0",
"is-arguments": "^1.0.4",
"supports-color": "^7.1.0",

@ -1,7 +1,6 @@
"use strict";
const isArguments = require("is-arguments");
const flatten = require("flatten");
const asExpression = require("as-expression");
const syncpipe = require("syncpipe");
@ -68,7 +67,7 @@ function applyDefinitions(args, definitions, remainingArgumentsIndex) {
return {
errors: syncpipe(results, [
(_) => _.map((result) => result.errors),
(_) => flatten(_) // TODO: Switch to `Array#flat` once Node 10.x goes EOL (April 2021)
(_) => _.flat()
]),
newValue: results.map((result) => result.newValue)
};

@ -97,10 +97,12 @@ function extractFramesGecko(stack) {
function extractFrames(stack) {
// TODO: Maybe make this code even more cautious, and match each stacktrace line individually, aborting as soon as any one line cannot be parsed?
return defaultValue(
extractFramesV8(stack),
extractFramesGecko(stack)
);
let v8Frames = extractFramesV8(stack);
if (v8Frames != null) {
return v8Frames;
} else {
return extractFramesGecko(stack);
}
}
module.exports = function parseStackTrace(error) {

Loading…
Cancel
Save