Comparing version 5.0.5 to 5.1.0
@@ -0,1 +1,8 @@ | ||
### v5.1.0 (2021-02-15) | ||
#### 🚀 New Features | ||
* [#119](https://github.com/groupon/gofer/pull/119) feat: capture async stack traces (for node) ([@aaarichter](https://github.com/aaarichter)) | ||
### v5.0.5 (2020-12-18) | ||
@@ -2,0 +9,0 @@ |
@@ -151,2 +151,13 @@ /* | ||
async function trackError(fn) { | ||
const stack = new Error().stack; | ||
try { | ||
return await fn(); | ||
} catch (e) { | ||
e.stack = `${e.stack}\n${stack.substring(stack.indexOf('\n') + 1)}`; | ||
throw e; | ||
} | ||
} | ||
function requestFunc(options, resolve, reject) { | ||
@@ -351,5 +362,5 @@ options = { ...options }; | ||
function request(options) { | ||
const result = new Promise(requestFunc.bind(null, options)); | ||
const result = trackError(() => new Promise(requestFunc.bind(null, options))); | ||
return Object.defineProperties(result, reqProperties); | ||
} | ||
module.exports = request; |
{ | ||
"name": "gofer", | ||
"version": "5.0.5", | ||
"version": "5.1.0", | ||
"description": "A general purpose service client library", | ||
@@ -28,3 +28,3 @@ "license": "BSD-3-Clause", | ||
"posttest:nlm": "nlm verify", | ||
"test:unit": "nyc mocha" | ||
"test:unit": "c8 mocha" | ||
}, | ||
@@ -46,3 +46,3 @@ "engines": { | ||
"dependencies": { | ||
"debug": "^4.2.0", | ||
"debug": "^4.3.1", | ||
"lodash.isobjectlike": "^4.0.0", | ||
@@ -54,4 +54,5 @@ "lodash.isplainobject": "^4.0.6", | ||
"devDependencies": { | ||
"assertive": "^5.0.0", | ||
"eslint": "^7.12.0", | ||
"assertive": "^5.0.2", | ||
"c8": "^7.5.0", | ||
"eslint": "^7.20.0", | ||
"eslint-config-groupon": "^10.0.1", | ||
@@ -61,10 +62,9 @@ "eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"form-data": "^3.0.0", | ||
"mocha": "^8.2.0", | ||
"mocha": "^8.3.0", | ||
"mochify": "^6.6.0", | ||
"nlm": "^5.1.0", | ||
"nlm": "^5.2.3", | ||
"npm-run-all": "^4.1.5", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.1.2", | ||
"prettier": "^2.2.1", | ||
"self-signed": "^1.3.1" | ||
@@ -71,0 +71,0 @@ }, |
@@ -0,1 +1,3 @@ | ||
[![Build Status](https://travis-ci.com/groupon/gofer.svg?branch=master)](https://travis-ci.com/groupon/gofer) | ||
# `gofer` | ||
@@ -2,0 +4,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
79808
1353
206
Updateddebug@^4.3.1