Skip to content

Commit

Permalink
fix(*): make code consistent with node 7.0
Browse files Browse the repository at this point in the history
node 7.0 and later mess up with the error stack, a bug in bin/test.js caused bad PR merges, revert

dotenv upgrade
  • Loading branch information
thetutlage committed Jan 12, 2017
1 parent 19da032 commit 58b22e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bin/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ if (semver.lt(nodeJsVersion, '6.0.0')) {
proxiesFlag = '--harmony_proxies'
}

shell.exec(`DB=${process.env.DB} node ${proxiesFlag} ./node_modules/.bin/istanbul cover _mocha --report lcovonly -- -R spec test/unit test/acceptance && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage`)
const result = shell.exec(`DB=${process.env.DB} node ${proxiesFlag} ./node_modules/.bin/istanbul cover _mocha --report lcovonly -- -R spec test/unit test/acceptance && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage`)

if (result.code !== 0) {
shell.exit(1)
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"cat-log": "^1.0.2",
"co": "^4.6.0",
"co-fs-extra": "^1.2.1",
"dotenv": "^3.0.0",
"dotenv": "^2.0.0",
"eventemitter2": "^2.1.3",
"lodash": "^4.16.6",
"node-cookie": "^1.0.3",
Expand Down
1 change: 1 addition & 0 deletions src/Server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class Server {
*/
_handleError (error, request, response) {
this._normalizeError(error)
Error.captureStackTrace(error)
if (this.event.wildcard() && this.event.hasListeners(['Http', 'error', '*'])) {
this.event.fire(['Http', 'error', error.status], error, request, response)
return
Expand Down

0 comments on commit 58b22e9

Please sign in to comment.