[Pkg-javascript-commits] [node-module-deps] 313/444: also check this.basedir for top-levelness

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:48:08 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 0a3ea8bc6d86e15961cc810ba7e5427c4f5a8e39
Author: James Halliday <mail at substack.net>
Date:   Wed Nov 19 03:39:38 2014 +0100

    also check this.basedir for top-levelness
---
 index.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/index.js b/index.js
index 21024fd..1813aa7 100644
--- a/index.js
+++ b/index.js
@@ -154,6 +154,10 @@ Deps.prototype.getTransforms = function (file, pkg, opts) {
         var m = path.relative(path.dirname(main), file);
         return m.split(/[\\\/]/).indexOf('node_modules') < 0;
     });
+    if (!isTopLevel) {
+        var m = path.relative(this.basedir, file);
+        isTopLevel = m.split(/[\\\/]/).indexOf('node_modules') < 0;
+    }
     
     var transforms = [].concat(isTopLevel ? this.transforms : [])
         .concat(getTransforms(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