[Pkg-javascript-commits] [node-tap-mocha-reporter] 64/137: Don't use exit-code module
Bastien Roucariès
rouca at moszumanska.debian.org
Thu Sep 7 09:49:27 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-tap-mocha-reporter.
commit 3b9c535e504dd356050fd6e194a09f368ed2e96a
Author: isaacs <i at izs.me>
Date: Tue May 26 11:25:31 2015 -0700
Don't use exit-code module
Conflicts in weird monkey-patchery ways with signal-exit
---
index.js | 11 ++++++++---
package.json | 1 -
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/index.js b/index.js
index 305565b..6e17bdd 100755
--- a/index.js
+++ b/index.js
@@ -17,10 +17,10 @@ if (!Writable) {
var Runner = require('./lib/runner.js')
var Parser = require('tap-parser')
-require('exit-code')
util.inherits(Formatter, Writable)
+var exitCode
function Formatter (type, options) {
if (!reporters[type]) {
console.error('Unknown format type: %s\n\n%s', type, avail())
@@ -39,7 +39,7 @@ function Formatter (type, options) {
this.end = p.end.bind(p)
p.on('complete', function () {
if (!p.ok)
- process.exitCode = 1
+ exitCode = 1
})
return this
}
@@ -50,10 +50,15 @@ function Formatter (type, options) {
runner.on('end', function () {
if (!runner.parser.ok)
- process.exitCode = 1
+ exitCode = 1
})
}
+process.on('exit', function (code) {
+ if (!code && exitCode)
+ process.exit(exitCode)
+})
+
Formatter.prototype.write = function () {
return this.runner.write.apply(this.runner, arguments)
}
diff --git a/package.json b/package.json
index 9b7b71c..d17f2d1 100644
--- a/package.json
+++ b/package.json
@@ -20,7 +20,6 @@
"debug": "^2.1.3",
"diff": "^1.3.2",
"escape-string-regexp": "^1.0.3",
- "exit-code": "^1.0.1",
"glob": "^5.0.5",
"js-yaml": "^3.3.1",
"supports-color": "^1.3.1",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap-mocha-reporter.git
More information about the Pkg-javascript-commits
mailing list