[Pkg-javascript-commits] [node-module-deps] 263/444: opts.ignoreMissing
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 f5105ca75e48d40d8a1bfead99ada6377819a6ac
Author: James Halliday <mail at substack.net>
Date: Mon Jul 21 18:09:25 2014 -0700
opts.ignoreMissing
---
index.js | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/index.js b/index.js
index afc92df..972defd 100644
--- a/index.js
+++ b/index.js
@@ -59,6 +59,10 @@ Deps.prototype._transform = function (row, enc, next) {
if (row.entry !== false) self.entries.push(row.file);
self.lookupPackage(row.file, function (err, pkg) {
+ if (err && this.options.ignoreMissing) {
+ self.pending --;
+ return next();
+ }
if (err) return self.emit('error', err)
self.pending --;
start(pkg)
@@ -236,6 +240,10 @@ Deps.prototype.walk = function (id, parent, cb) {
}
self.resolve(id, parent, function (err, file, pkg) {
+ if (err && self.options.ignoreMissing) {
+ if (-- self.pending === 0) self.push(null);
+ return cb(null, undefined);
+ }
if (err) return self.emit('error', err);
if (self.visited[file]) {
if (-- self.pending === 0) self.push(null);
--
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