@twreporter/errors
Advanced tools
Comparing version 1.0.0 to 1.1.0-rc.0
@@ -6,34 +6,29 @@ # Change Log | ||
# [1.0.0](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/errors@1.0.0-rc.1...@twreporter/errors@1.0.0) (2020-03-12) | ||
# [1.1.0-rc.0](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/errors@1.0.0...@twreporter/errors@1.1.0-rc.0) (2020-03-16) | ||
**Note:** Version bump only for package @twreporter/errors | ||
### Features | ||
* add trimCauseStack param to printAll ([6a3fa3f](https://github.com/twreporter/twreporter-npm-packages/commit/6a3fa3fab032c0999595d63851a8aa1e24752d16)) | ||
# [1.0.0-rc.1](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/errors@1.0.0-rc.0...@twreporter/errors@1.0.0-rc.1) (2020-03-12) | ||
**Note:** Version bump only for package @twreporter/errors | ||
# [1.0.0](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/errors@1.0.0-rc.1...@twreporter/errors@1.0.0) (2020-03-12) | ||
**Note:** Version bump only for package @twreporter/errors | ||
# [1.0.0-rc.1](https://github.com/twreporter/twreporter-npm-packages/compare/@twreporter/errors@1.0.0-rc.0...@twreporter/errors@1.0.0-rc.1) (2020-03-12) | ||
**Note:** Version bump only for package @twreporter/errors | ||
# 1.0.0-rc.0 (2020-03-12) | ||
### Features | ||
* **errors:** add new package errors ([bed75d8](https://github.com/twreporter/twreporter-npm-packages/commit/bed75d8ee55198215b56644d4b63092297feec7c)) | ||
- **errors:** add new package errors ([bed75d8](https://github.com/twreporter/twreporter-npm-packages/commit/bed75d8ee55198215b56644d4b63092297feec7c)) | ||
### BREAKING CHANGES | ||
* **errors:** initial release | ||
# Change Log | ||
- **errors:** initial release |
@@ -25,3 +25,3 @@ "use strict"; | ||
* @param {boolean} fields.withPayload | ||
* @param {number} [trimStack=9] - how many lines that will be trimmed in the stack from the bottom | ||
* @param {number} [trimStack=0] - how many lines that will be trimmed in the stack from the bottom | ||
* @returns {string} | ||
@@ -45,2 +45,4 @@ */ | ||
} | ||
var defaultTrimStack = Error.stackTraceLimit > 1 ? Error.stackTraceLimit - 1 : 0; | ||
/** | ||
@@ -53,11 +55,11 @@ * print the information of all errors from cause to input errors | ||
* @param {boolean} [fields.withPayload=true] | ||
* @param {boolean} [fields.withCauseStack=false] | ||
* @param {number} [limit=0] - how many errors will be printed from the cause. if limit = 0, all errors will be printed | ||
* @param {number} [trimCauseStack=defaultTrimStack] - how many frames of cause stack will be trimmed | ||
* @returns {string} | ||
*/ | ||
function printAll(error, fields) { | ||
function printAll(error) { | ||
var fields = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var limit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; | ||
var trimCauseStack = Error.stackTraceLimit > 1 ? Error.stackTraceLimit - 1 : 0; | ||
var trimCauseStack = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : defaultTrimStack; | ||
var _fields$withStack2 = fields.withStack, | ||
@@ -64,0 +66,0 @@ withStack = _fields$withStack2 === void 0 ? true : _fields$withStack2, |
{ | ||
"name": "@twreporter/errors", | ||
"version": "1.0.0", | ||
"version": "1.1.0-rc.0", | ||
"main": "lib/index.js", | ||
@@ -23,3 +23,3 @@ "repository": "https://github.com/twreporter/twreporter-npm-packages.git", | ||
}, | ||
"gitHead": "f1745193c20ea9100c66e796f095cca9fa96b5f7" | ||
"gitHead": "89db0e545af96a7a2746c2706939e76805687470" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
27080
356
2