module-deps
Advanced tools
Comparing version 3.0.0 to 3.1.0
12
index.js
@@ -132,3 +132,3 @@ var fs = require('fs'); | ||
Deps.prototype.readFile = function (file, pkg) { | ||
Deps.prototype.readFile = function (file, id, pkg) { | ||
var tr = through(); | ||
@@ -142,3 +142,3 @@ if (this.cache && this.cache[file]) { | ||
rs.on('error', function (err) { tr.emit('error', err) }); | ||
this.emit('file', file); | ||
this.emit('file', file, id); | ||
return rs.pipe(this.getTransforms(file, pkg)); | ||
@@ -246,2 +246,6 @@ }; | ||
self.resolve(id, parent, function (err, file, pkg) { | ||
if (opts.postFilter && !opts.postFilter(id, file, pkg)) { | ||
if (--self.pending === 0) self.push(null); | ||
return cb(null, undefined); | ||
} | ||
if (err && rec.source) { | ||
@@ -258,3 +262,3 @@ file = rec.file; | ||
if (err && self.options.ignoreMissing) { | ||
if (-- self.pending === 0) self.push(null); | ||
if (--self.pending === 0) self.push(null); | ||
self.emit('missing', id, parent); | ||
@@ -282,3 +286,3 @@ return cb(null, undefined); | ||
self.readFile(file, pkg).pipe(concat(function (body) { | ||
self.readFile(file, id, pkg).pipe(concat(function (body) { | ||
fromSource(body.toString('utf8')); | ||
@@ -285,0 +289,0 @@ })); |
{ | ||
"name": "module-deps", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "walk the dependency graph to generate json output that can be fed into browser-pack", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42753
1043
218