[Pkg-javascript-commits] [node-module-deps] 411/444: utf8 encoding to avoid streaming buffer chunk issues

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:18 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 7c635ed2b923c9e92524c3fa75698b463f4d3dcd
Author: James Halliday <mail at substack.net>
Date:   Sat Dec 19 11:02:56 2015 -0500

    utf8 encoding to avoid streaming buffer chunk issues
---
 index.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index e3baa80..c0ca8bb 100644
--- a/index.js
+++ b/index.js
@@ -188,7 +188,9 @@ Deps.prototype.readFile = function (file, id, pkg) {
         tr.push(null);
         return tr;
     }
-    var rs = fs.createReadStream(file);
+    var rs = fs.createReadStream(file, {
+        encoding: 'utf8'
+    });
     rs.on('error', function (err) { self.emit('error', err) });
     this.emit('file', file, id);
     return rs;

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