Skip to content

Commit 84f1fd7

Browse files
committed
Replace globule with micromatch
1 parent 1fad90d commit 84f1fd7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/matchdep.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
'use strict';
1010

11-
var globule = require('globule');
11+
var micromatch = require('micromatch');
1212
var findup = require('findup-sync');
1313
var resolve = require('resolve').sync;
1414
var stackTrace = require('stack-trace');
@@ -71,6 +71,6 @@ Object.keys(methods).forEach(function(method) {
7171
var search = props.reduce(function(result, prop) {
7272
return result.concat(config[prop]);
7373
}, []);
74-
return globule.match(pattern, search);
74+
return micromatch(search, pattern);
7575
};
7676
});

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
},
2525
"dependencies": {
2626
"findup-sync": "~0.3.0",
27+
"micromatch": "^2.3.7",
2728
"resolve": "~1.1.6",
28-
"stack-trace": "0.0.9",
29-
"globule": "~0.2.0"
29+
"stack-trace": "0.0.9"
3030
},
3131
"devDependencies": {
32+
"grunt": "~0.4.1",
3233
"grunt-contrib-jshint": "~0.11.3",
33-
"grunt-contrib-nodeunit": "~0.4.1",
34-
"grunt": "~0.4.1"
34+
"grunt-contrib-nodeunit": "~0.4.1"
3535
},
3636
"keywords": [
3737
"package.json",

test/matchdep_test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ exports['matchdep'] = {
3636
},
3737
'multiple pattern support': function(test) {
3838
test.expect(1);
39-
test.equal(matchdep.filterAll(['*','!globule']).join(), 'findup-sync,resolve,stack-trace,grunt-contrib-jshint,grunt-contrib-nodeunit,grunt', 'should find everything except globule');
39+
test.equal(matchdep.filterAll(['*','!micromatch']).join(), 'findup-sync,resolve,stack-trace,grunt,grunt-contrib-jshint,grunt-contrib-nodeunit', 'should find everything except micromatch');
4040
test.done();
4141
},
4242
'default to package.json': function(test) {
4343
test.expect(1);
44-
test.equal(matchdep.filter('*').join(), 'findup-sync,resolve,stack-trace,globule', 'should find all dependencies and devDependencies matching "*"');
44+
test.equal(matchdep.filter('*').join(), 'findup-sync,micromatch,resolve,stack-trace', 'should find all dependencies and devDependencies matching "*"');
4545
test.done();
4646
},
4747
'path is relative to calling module, not cwd': function(test) {
@@ -50,7 +50,7 @@ exports['matchdep'] = {
5050
test.equal(submodule.defaultConfig().join(), 'pkg-1,pkg-2,pkg-3', 'should find all deps in package.json next to submodule');
5151
test.equal(submodule.fileConfig().join(), 'pkg-1,pkg-2,pkg-3', 'should find all deps in package.json next to submodule');
5252
test.equal(submodule.relativeConfig().join(), 'pkg-1,pkg-2,pkg-3', 'should find all deps in package.json next to submodule');
53-
test.equal(submodule.relativeConfig2().join(), 'findup-sync,resolve,stack-trace,globule', 'should find all deps in ../../package.json from submodule');
53+
test.equal(submodule.relativeConfig2().join(), 'findup-sync,micromatch,resolve,stack-trace', 'should find all deps in ../../package.json from submodule');
5454
test.equal(submodule.absoluteConfig().join(), 'pkg-1,pkg-2,pkg-3', 'should find all deps in package.json next to submodule');
5555
test.done();
5656
},

0 commit comments

Comments
 (0)