remove Error.captureStackTrace monkey patch as it's no longer necessary with the latest ast-types
This commit is contained in:
@@ -1,21 +1,3 @@
|
||||
// this is gross but it monkey patches in behaviour required by `depd` used by
|
||||
// `ast-types`
|
||||
Error.captureStackTrace = Error.captureStackTrace || function (obj) {
|
||||
if (Error.prepareStackTrace) {
|
||||
var frame = {
|
||||
isEval: function () { return false; },
|
||||
getFileName: function () { return "filename"; },
|
||||
getLineNumber: function () { return 1; },
|
||||
getColumnNumber: function () { return 1; },
|
||||
getFunctionName: function () { return "functionName"; }
|
||||
};
|
||||
|
||||
obj.stack = Error.prepareStackTrace(obj, [frame, frame, frame]);
|
||||
} else {
|
||||
obj.stack = obj.stack || obj.name || "Error";
|
||||
}
|
||||
};
|
||||
|
||||
var transform = module.exports = require("./transformation/transform");
|
||||
|
||||
transform.transform = transform;
|
||||
|
||||
Reference in New Issue
Block a user