[Pkg-javascript-commits] [node-module-deps] 223/444: fixed an intermittent resolve bug

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 9e7a901472fdeb35349ff093618c7e33a2f426ce
Author: James Halliday <mail at substack.net>
Date:   Fri May 9 21:14:33 2014 -0700

    fixed an intermittent resolve bug
---
 index.js | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/index.js b/index.js
index 6f85e90..5371006 100644
--- a/index.js
+++ b/index.js
@@ -217,16 +217,12 @@ Deps.prototype.getTransforms = function (file, pkg) {
     }
     
     function loadTransform (id, trOpts, cb) {
-        var params = {
-            basedir: pkg.__dirname && pkg.__dirname !== process.cwd()
-                ? pkg.__dirname
-                : path.dirname(file)
-        };
+        var params = { basedir: path.dirname(file) };
         nodeResolve(id, params, function nr (err, res, again) {
             if (err && again) return cb(err);
             
             if (err) {
-                params.basedir = process.cwd();
+                params.basedir = pkg.__dirname;
                 return nodeResolve(id, params, function (e, r) {
                     nr(e, r, true)
                 });

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