[Pkg-javascript-commits] [node-module-deps] 265/444: fix if .source is already defined

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:02 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 81f79841c99422cdf1c6d3b4b2d6e8c82d9167c8
Author: James Halliday <mail at substack.net>
Date:   Mon Jul 21 18:37:51 2014 -0700

    fix if .source is already defined
---
 index.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index bfcaf7d..8855b07 100644
--- a/index.js
+++ b/index.js
@@ -237,10 +237,14 @@ Deps.prototype.walk = function (id, parent, cb) {
     if (typeof id === 'object') {
         rec = copy(id);
         if (rec.entry === false) delete rec.entry;
-        id = rec.file;
+        id = rec.file || rec.id;
     }
     
     self.resolve(id, parent, function (err, file, pkg) {
+        if (err && rec.source) {
+            file = rec.file;
+            return fromSource(rec.source);
+        }
         if (err && self.options.ignoreMissing) {
             if (-- self.pending === 0) self.push(null);
             self.emit('missing', id, parent);

-- 
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