[Pkg-javascript-commits] [node-module-deps] 219/444: also cache missed files

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:57 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 460c7a5ec0eae0fdd4f8d875147e564c6e62dda8
Author: James Halliday <mail at substack.net>
Date:   Fri May 9 17:03:58 2014 -0700

    also cache missed files
---
 index.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 7f61b2c..fc09491 100644
--- a/index.js
+++ b/index.js
@@ -340,7 +340,6 @@ Deps.prototype.parseDeps = function (file, src, cb) {
 Deps.prototype.lookupPackage = function (file, cb) {
     var self = this;
     
-    var id = path.resolve(this.basedir, file);
     var cached = this.pkgCache[file];
     if (cached) return nextTick(cb, null, cached);
     if (cached === false) return nextTick(cb, null, undefined);
@@ -392,6 +391,7 @@ Deps.prototype.lookupPackage = function (file, cb) {
             else if (pkg) cb(null, pkg)
             else {
                 self.pkgCache[pkgfile] = false;
+                self.pkgCache[file] = false;
                 next();
             }
         }

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