[Pkg-javascript-commits] [node-module-deps] 270/444: emit id with file event
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:48:03 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 9b17ea3ea55f1ac5df2d778f42b6d19741832d98
Author: James Halliday <mail at substack.net>
Date: Mon Jul 21 21:52:10 2014 -0700
emit id with file event
---
index.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/index.js b/index.js
index 32be4e5..ae81958 100644
--- a/index.js
+++ b/index.js
@@ -129,7 +129,7 @@ Deps.prototype.resolve = function (id, parent, cb) {
});
};
-Deps.prototype.readFile = function (file, pkg) {
+Deps.prototype.readFile = function (file, id, pkg) {
var tr = through();
if (this.cache && this.cache[file]) {
tr.push(this.cache[file].source);
@@ -138,7 +138,7 @@ Deps.prototype.readFile = function (file, pkg) {
}
var rs = fs.createReadStream(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));
};
@@ -275,7 +275,7 @@ Deps.prototype.walk = function (id, parent, cb) {
var c = self.cache && self.cache[file];
if (c) return fromDeps(file, c.source, c.package, Object.keys(c.deps));
- self.readFile(file, pkg).pipe(concat(function (body) {
+ self.readFile(file, id, pkg).pipe(concat(function (body) {
fromSource(body.toString('utf8'));
}));
--
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