node-fetch
Advanced tools
Comparing version 1.7.2 to 1.7.3
@@ -10,2 +10,6 @@ | ||
## v1.7.3 | ||
- Enhance: `FetchError` now gives a correct trace stack (backport from v2.x relese). | ||
## v1.7.2 | ||
@@ -12,0 +16,0 @@ |
@@ -20,5 +20,2 @@ | ||
// hide custom error implementation details from end-users | ||
Error.captureStackTrace(this, this.constructor); | ||
this.name = this.constructor.name; | ||
@@ -33,4 +30,6 @@ this.message = message; | ||
// hide custom error implementation details from end-users | ||
Error.captureStackTrace(this, this.constructor); | ||
} | ||
require('util').inherits(FetchError, Error); |
{ | ||
"name": "node-fetch", | ||
"version": "1.7.2", | ||
"version": "1.7.3", | ||
"description": "A light-weight module that brings window.fetch to node.js and io.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1461,3 +1461,3 @@ | ||
it('should create custom FetchError', function() { | ||
it('should create custom FetchError', function funcName() { | ||
var systemError = new Error('system'); | ||
@@ -1474,2 +1474,4 @@ systemError.code = 'ESOMEERROR'; | ||
expect(err.errno).to.equal('ESOMEERROR'); | ||
expect(err.stack).to.include('funcName'); | ||
expect(err.stack.split('\n')[0]).to.equal(err.name + ': ' + err.message); | ||
}); | ||
@@ -1476,0 +1478,0 @@ |
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
122035
3533