Socket
Socket
Sign inDemoInstall

make-error-cause

Package Overview
Dependencies
1
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.2.1 to 2.3.0

dist/index.d.ts.map

1

dist/index.d.ts

@@ -13,1 +13,2 @@ import * as makeError from "make-error";

export declare function fullStack(error: Error | BaseError): string;
//# sourceMappingURL=index.d.ts.map

22

dist/index.js

@@ -30,5 +30,10 @@ "use strict";

_this.cause = cause;
Object.defineProperty(_this, "cause", {
writable: false,
enumerable: false,
configurable: false
});
return _this;
}
BaseError.prototype[util_1.inspect.custom || "inspect"] = function () {
BaseError.prototype[util_1.inspect.custom || /* istanbul ignore next */ "inspect"] = function () {
return fullStack(this);

@@ -43,12 +48,13 @@ };

function fullStack(error) {
var err = error.cause;
var fullStack = error.stack || error.message || "";
while (err) {
fullStack += exports.SEPARATOR_TEXT;
fullStack += err.stack || err.message || "";
err = err.cause;
var chain = [];
var cause = error;
while (cause) {
chain.push(cause);
cause = cause.cause;
}
return fullStack;
return chain
.map(function (err) { return util_1.inspect(err, { customInspect: false }); })
.join(exports.SEPARATOR_TEXT);
}
exports.fullStack = fullStack;
//# sourceMappingURL=index.js.map
{
"name": "make-error-cause",
"version": "2.2.1",
"version": "2.3.0",
"description": "Make your own nested error types!",

@@ -14,4 +14,5 @@ "main": "dist/index.js",

"format": "npm run prettier -- README.md .travis.yml \"src/**/*.{jsx?,tsx?}\"",
"build": "rimraf dist && tsc",
"specs": "jest --coverage",
"clean": "rimraf dist .nyc_output mochawesome-report coverage",
"build": "npm run clean && tsc",
"specs": "nyc mocha",
"test": "npm run -s lint && npm run -s build && npm run -s specs",

@@ -42,19 +43,2 @@ "prepare": "npm run build"

"homepage": "https://github.com/blakeembrey/make-error-cause",
"jest": {
"roots": [
"<rootDir>/src/"
],
"transform": {
"\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
},
"husky": {

@@ -75,12 +59,18 @@ "hooks": {

"devDependencies": {
"@types/jest": "^24.0.15",
"@types/node": "^12.6.2",
"husky": "^3.0.0",
"jest": "^24.8.0",
"lint-staged": "^9.1.0",
"@types/chai": "^4.2.0",
"@types/jest": "^24.0.17",
"@types/mocha": "^5.2.7",
"@types/node": "^12.7.2",
"chai": "^4.2.0",
"husky": "^3.0.3",
"jest": "^24.9.0",
"lint-staged": "^9.2.1",
"mocha": "^6.2.0",
"mochawesome": "^4.1.0",
"nyc": "^14.1.1",
"prettier": "^1.18.2",
"rimraf": "^2.6.3",
"rimraf": "^3.0.0",
"ts-jest": "^24.0.2",
"ts-node": "^8.3.0",
"tslint": "^5.9.1",
"tslint": "^5.18.0",
"tslint-config-prettier": "^1.18.0",

@@ -87,0 +77,0 @@ "tslint-config-standard": "^8.0.1",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc