Comparing version 6.2.0 to 6.2.1
@@ -0,1 +1,10 @@ | ||
## [6.2.1](https://github.com/nfroidure/yerror/compare/v6.2.0...v6.2.1) (2022-12-19) | ||
### Bug Fixes | ||
* **lib:** fix stack printing ([edf5fd3](https://github.com/nfroidure/yerror/commit/edf5fd32126a1689863cc995859243251d25c8b4)) | ||
# [6.2.0](https://github.com/nfroidure/yerror/compare/v6.1.1...v6.2.0) (2022-12-19) | ||
@@ -2,0 +11,0 @@ |
@@ -182,3 +182,3 @@ "use strict"; | ||
function printStackTrace(err) { | ||
return typeof err === 'object' && typeof err.stack === 'function' ? err.stack() : `[no_stack_trace]: error is ${err != null && typeof err.toString === 'function' ? err.toString() : typeof err}`; | ||
return typeof err === 'object' && typeof err.stack === 'string' ? err.stack : `[no_stack_trace]: error is ${err != null && typeof err.toString === 'function' ? err.toString() : typeof err}`; | ||
} // In order to keep compatibility through major versions | ||
@@ -185,0 +185,0 @@ // we have to make kind of an cross major version instanceof |
{ | ||
"name": "yerror", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"description": "It helps to know why you got an error.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
@@ -136,4 +136,4 @@ import os from 'os'; | ||
export function printStackTrace(err) { | ||
return typeof err === 'object' && typeof err.stack === 'function' | ||
? err.stack() | ||
return typeof err === 'object' && typeof err.stack === 'string' | ||
? err.stack | ||
: `[no_stack_trace]: error is ${ | ||
@@ -140,0 +140,0 @@ err != null && typeof err.toString === 'function' |
Sorry, the diff of this file is not supported yet
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
103081