[Pkg-javascript-commits] [node-module-deps] 221/444: apply transforms to streams

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 ab53627e698ff8ca83ff9ce933473128250cd954
Author: James Halliday <mail at substack.net>
Date:   Fri May 9 17:22:26 2014 -0700

    apply transforms to streams
---
 index.js | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/index.js b/index.js
index fc64cbe..6b5cfe1 100644
--- a/index.js
+++ b/index.js
@@ -254,13 +254,17 @@ Deps.prototype.walk = function (id, parent, cb) {
     this.pending ++;
     
     if (id && typeof id === 'object' && id.stream) {
-        return id.stream.pipe(concat(function (body) {
-            var src = body.toString('utf8');
-            var deps = self.parseDeps(id.file, src);
-            self.lookupPackage(id.file, function (err, pkg) {
-                fromDeps(id.file, src, pkg || {}, deps);
-            });
-        }));
+        self.lookupPackage(id.file, function (err, pkg) {
+            id.stream
+                .pipe(self.getTransforms(id.file, pkg))
+                .pipe(concat(function (body) {
+                    var src = body.toString('utf8');
+                    var deps = self.parseDeps(id.file, src);
+                    fromDeps(id.file, src, pkg || {}, deps);
+                }))
+            ;
+        });
+        return;
     }
     
     self.resolve(id, parent, function (err, file, pkg) {

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