[Pkg-javascript-commits] [node-module-deps] 32/444: only apply opts.transform to top-level modules
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:47:40 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 fd3b0b66304e3ce53fd8d496123d6bebcf795f86
Author: James Halliday <mail at substack.net>
Date: Wed Feb 27 04:06:02 2013 -0800
only apply opts.transform to top-level modules
---
index.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/index.js b/index.js
index 17f1a9a..7f78a39 100644
--- a/index.js
+++ b/index.js
@@ -57,6 +57,12 @@ module.exports = function (mains, opts) {
var tr = trs[0];
var cmd = parseShell(tr);
+ var isTopLevel = mains.some(function (main) {
+ var m = path.relative(path.dirname(main), file);
+ return m.split('/').indexOf('node_modules') < 0;
+ });
+ if (!isTopLevel) return ap(trs.slice(1));
+
var ps = spawn(cmd[0], cmd.slice(1), {
cwd: path.dirname(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