[Pkg-javascript-commits] [node-module-deps] 41/444: use node's resolve not the browser version for the transform module lookups

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:41 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 f91d46624e53869509c549adee869b151e795489
Author: James Halliday <mail at substack.net>
Date:   Wed Feb 27 16:13:37 2013 -0800

    use node's resolve not the browser version for the transform module lookups
---
 index.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index 3659f40..cc30219 100644
--- a/index.js
+++ b/index.js
@@ -5,6 +5,7 @@ var parseShell = require('shell-quote').parse;
 var duplexer = require('duplexer');
 
 var browserResolve = require('browser-resolve');
+var nodeResolve = require('resolve');
 var detective = require('detective');
 var through = require('through');
 
@@ -125,8 +126,8 @@ module.exports = function (mains, opts) {
         var tout = through(), tin = through();
         tin.pause();
         
-        var parent = { id: file, filename: file, paths: [] };
-        resolve(tr, parent, function (err, res) {
+        var params = { basedir: path.dirname(file) };
+        nodeResolve(tr, params, function (err, res) {
             if (err) return output.emit('error', err);
             var t = res
                 ? require(res)(file)

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