@naturalcycles/js-lib
Advanced tools
Comparing version 4.4.0 to 4.4.1
@@ -0,1 +1,8 @@ | ||
## [4.4.1](https://github.com/NaturalCycles/js-lib/compare/v4.4.0...v4.4.1) (2019-03-26) | ||
### Bug Fixes | ||
* errorObjectToAppError, stack is readonly property in some envs ([e308f6e](https://github.com/NaturalCycles/js-lib/commit/e308f6e)) | ||
# [4.4.0](https://github.com/NaturalCycles/js-lib/compare/v4.3.0...v4.4.0) (2019-03-24) | ||
@@ -2,0 +9,0 @@ |
@@ -42,8 +42,8 @@ import { AppError, HttpError, isObject } from '..'; | ||
const err = Object.assign(new AppError(o.message, o.data), { | ||
// name: err.name, // cannot be assigned to a readonly property like this | ||
stack: o.stack, | ||
// name: err.name, // cannot be assigned to a readonly property like this | ||
// stack: o.stack, // also readonly e.g in Firefox | ||
}); | ||
// Object.defineProperty(err, 'name', { | ||
// value: o.name, | ||
// }) | ||
Object.defineProperty(err, 'stack', { | ||
value: o.stack, | ||
}); | ||
return err; | ||
@@ -53,8 +53,8 @@ } | ||
const err = Object.assign(new HttpError(o.message, Object.assign({ httpStatusCode: 500 }, o.data)), { | ||
// name: err.name, // cannot be assigned to a readonly property like this | ||
stack: o.stack, | ||
// name: err.name, // cannot be assigned to a readonly property like this | ||
// stack: o.stack, // readonly | ||
}); | ||
// Object.defineProperty(err, 'name', { | ||
// value: o.name, | ||
// }) | ||
Object.defineProperty(err, 'stack', { | ||
value: o.stack, | ||
}); | ||
return err; | ||
@@ -61,0 +61,0 @@ } |
@@ -47,8 +47,8 @@ "use strict"; | ||
const err = Object.assign(new __1.AppError(o.message, o.data), { | ||
// name: err.name, // cannot be assigned to a readonly property like this | ||
stack: o.stack, | ||
// name: err.name, // cannot be assigned to a readonly property like this | ||
// stack: o.stack, // also readonly e.g in Firefox | ||
}); | ||
// Object.defineProperty(err, 'name', { | ||
// value: o.name, | ||
// }) | ||
Object.defineProperty(err, 'stack', { | ||
value: o.stack, | ||
}); | ||
return err; | ||
@@ -59,8 +59,8 @@ } | ||
const err = Object.assign(new __1.HttpError(o.message, Object.assign({ httpStatusCode: 500 }, o.data)), { | ||
// name: err.name, // cannot be assigned to a readonly property like this | ||
stack: o.stack, | ||
// name: err.name, // cannot be assigned to a readonly property like this | ||
// stack: o.stack, // readonly | ||
}); | ||
// Object.defineProperty(err, 'name', { | ||
// value: o.name, | ||
// }) | ||
Object.defineProperty(err, 'stack', { | ||
value: o.stack, | ||
}); | ||
return err; | ||
@@ -67,0 +67,0 @@ } |
{ | ||
"name": "@naturalcycles/js-lib", | ||
"version": "4.4.0", | ||
"version": "4.4.1", | ||
"scripts": { | ||
@@ -19,3 +19,3 @@ "build": "del ./dist && tsc", | ||
"@naturalcycles/semantic-release": "^1.0.0", | ||
"@naturalcycles/shared-module": "^4.0.3", | ||
"@naturalcycles/shared-module": "^5.1.0", | ||
"@types/benchmark": "^1.0.31", | ||
@@ -22,0 +22,0 @@ "@types/jest": "^24.0.6", |
@@ -49,8 +49,8 @@ import { AppError, HttpError, HttpErrorData, isObject } from '..' | ||
// name: err.name, // cannot be assigned to a readonly property like this | ||
stack: o.stack, | ||
// stack: o.stack, // also readonly e.g in Firefox | ||
}) | ||
// Object.defineProperty(err, 'name', { | ||
// value: o.name, | ||
// }) | ||
Object.defineProperty(err, 'stack', { | ||
value: o.stack, | ||
}) | ||
@@ -68,9 +68,9 @@ return err | ||
// name: err.name, // cannot be assigned to a readonly property like this | ||
stack: o.stack, | ||
// stack: o.stack, // readonly | ||
}, | ||
) | ||
// Object.defineProperty(err, 'name', { | ||
// value: o.name, | ||
// }) | ||
Object.defineProperty(err, 'stack', { | ||
value: o.stack, | ||
}) | ||
@@ -77,0 +77,0 @@ return err |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
118522