[Pkg-javascript-commits] [node-module-deps] 53/444: end the stream at the other pending check

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-module-deps.

commit 3555c76446b010f6d5bf05c3221a5dd58962072a
Author: James Halliday <mail at substack.net>
Date:   Wed Feb 27 19:17:32 2013 -0800

    end the stream at the other pending check
---
 index.js     | 5 ++++-
 package.json | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index 0de12c2..d33ab6c 100644
--- a/index.js
+++ b/index.js
@@ -58,7 +58,10 @@ module.exports = function (mains, opts) {
                 parent.filename
             ].join(''));
             if (cb) cb(file);
-            if (visited[file]) { --pending; return };
+            if (visited[file]) {
+                if (--pending === 0) output.queue(null);
+                return;
+            }
             visited[file] = true;
             
             fs.readFile(file, 'utf8', function (err, src) {
diff --git a/package.json b/package.json
index 9b7c192..e6e0aca 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
     "name": "module-deps",
-    "version": "0.4.2",
+    "version": "0.4.3",
     "description": "walk the dependency graph to generate json output that can be fed into browser-pack",
     "main": "index.js",
     "bin": {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-module-deps.git



More information about the Pkg-javascript-commits mailing list