[Pkg-javascript-commits] [node-module-deps] 96/444: 0.10.3, fixes pkg_filter test

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:47:46 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 1fef8acfdda58ef26fb363a427d4a31329bfefcf
Author: James Halliday <mail at substack.net>
Date:   Sat Jun 8 20:32:33 2013 -0700

    0.10.3, fixes pkg_filter test
---
 index.js           | 2 ++
 package.json       | 2 +-
 test/pkg_filter.js | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 3f999e6..bd31450 100644
--- a/index.js
+++ b/index.js
@@ -48,6 +48,8 @@ module.exports = function (mains, opts) {
             : resolve;
         ;
         
+        if (opts.packageFilter) parent.packageFilter = opts.packageFilter;
+        
         resolver(id, parent, function (err, file, pkg) {
             if (err) return output.emit('error', err);
             if (!file) return output.emit('error', new Error([
diff --git a/package.json b/package.json
index 10dce03..894dc7a 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
     "name": "module-deps",
-    "version": "0.10.2",
+    "version": "0.10.3",
     "description": "walk the dependency graph to generate json output that can be fed into browser-pack",
     "main": "index.js",
     "bin": {
diff --git a/test/pkg_filter.js b/test/pkg_filter.js
index 135a258..62fe4a7 100644
--- a/test/pkg_filter.js
+++ b/test/pkg_filter.js
@@ -11,6 +11,7 @@ test('pkg filter', function (t) {
         packageFilter: function (pkg) {
             t.equal(pkg.main, 'one.js');
             pkg.main = 'two.js'
+            return pkg;
         }
     });
     var pack = packer();

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