[Pkg-javascript-commits] [node-module-deps] 39/444: do opts.packageFilter() before checking for the transform field
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 92de525c607ad374dd88d2260a7a08dbb9e7ae15
Author: James Halliday <mail at substack.net>
Date: Wed Feb 27 15:47:52 2013 -0800
do opts.packageFilter() before checking for the transform field
---
index.js | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/index.js b/index.js
index eeeaec6..53310c7 100644
--- a/index.js
+++ b/index.js
@@ -21,11 +21,9 @@ module.exports = function (mains, opts) {
var output = through();
if (!opts) opts = {};
- if (opts.cache === undefined) opts.cache = cache;
var transforms = [].concat(opts.transform).filter(Boolean);
var resolve = opts.resolve || browserResolve;
- opts.includeSource = true;
var top = { id: '/', filename: '/', paths: [] };
mains.forEach(function (main) { walk(main, top) });
@@ -41,11 +39,12 @@ module.exports = function (mains, opts) {
var trx = [];
parent.packageFilter = function (pkg) {
+ if (opts.packageFilter) pkg = opts.packageFilter(pkg);
if (pkg.browserify && typeof pkg.browserify === 'object'
&& pkg.browserify.transform) {
trx = [].concat(pkg.browserify.transform);
}
- return opts.packageFilter ? opts.packageFilter(pkg) : pkg;
+ return pkg;
};
resolve(id, parent, function (err, 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