express-promise-router
Advanced tools
Comparing version 4.0.1 to 4.1.0
# express-promise-router | ||
## 4.1.0 | ||
### Minor Changes | ||
- c2f70e2: The handler function now uses the name of the original (wrapped) handler as its name to aid in debugging and tracing. | ||
## 4.0.1 | ||
@@ -4,0 +10,0 @@ |
@@ -52,10 +52,18 @@ "use strict"; | ||
if (handler.length === 4) { | ||
return function (err, req, res, next) { | ||
handleReturn([err, req, res, next]); | ||
// Preserve the original handler function name. See #146. | ||
const wrapperObj = { | ||
[handler.name]: function (err, req, res, next) { | ||
handleReturn([err, req, res, next]); | ||
}, | ||
}; | ||
return wrapperObj[handler.name]; | ||
} | ||
return function (req, res, next) { | ||
handleReturn([req, res, next]); | ||
// Preserve the original handler function name. See #146. | ||
const wrapperObj = { | ||
[handler.name]: function (req, res, next) { | ||
handleReturn([req, res, next]); | ||
}, | ||
}; | ||
return wrapperObj[handler.name]; | ||
}; | ||
@@ -62,0 +70,0 @@ |
{ | ||
"name": "express-promise-router", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"main": "lib/express-promise-router.js", | ||
@@ -53,19 +53,19 @@ "description": "A lightweight wrapper for Express 4's Router that allows middleware to return promises", | ||
"devDependencies": { | ||
"@babel/core": "7.10.2", | ||
"@babel/plugin-transform-modules-commonjs": "7.10.1", | ||
"@changesets/cli": "2.9.1", | ||
"@babel/core": "7.13.10", | ||
"@babel/plugin-transform-modules-commonjs": "7.13.8", | ||
"@changesets/cli": "2.14.1", | ||
"@mormahr/typescript-definition-tester": "1.1.0", | ||
"@types/express": "4.17.6", | ||
"chai": "4.2.0", | ||
"eslint": "7.2.0", | ||
"eslint-config-prettier": "6.11.0", | ||
"@types/express": "4.17.11", | ||
"chai": "4.3.4", | ||
"eslint": "7.22.0", | ||
"eslint-config-prettier": "8.1.0", | ||
"express": "4.17.1", | ||
"husky": "4.2.5", | ||
"lint-staged": "10.2.11", | ||
"mocha": "8.0.1", | ||
"prettier": "2.0.5", | ||
"husky": "5.1.3", | ||
"lint-staged": "10.5.4", | ||
"mocha": "8.3.2", | ||
"prettier": "2.2.1", | ||
"request": "2.88.2", | ||
"request-promise": "4.2.5", | ||
"sinon": "9.0.2", | ||
"typescript": "3.9.5" | ||
"request-promise": "4.2.6", | ||
"sinon": "9.2.4", | ||
"typescript": "4.2.3" | ||
}, | ||
@@ -72,0 +72,0 @@ "types": "index.d.ts", |
@@ -174,4 +174,2 @@ # express-promise-router | ||
### Unreleased | ||
See [CHANGELOG](https://github.com/express-promise-router/express-promise-router/blob/trunk/CHANGELOG.md) | ||
@@ -178,0 +176,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
40401
25
984
183