Skip to content

Commit dedd109

Browse files
authoredApr 30, 2018
Merge pull request #12 from micromatch/snap-11
Update snapdragon to 0.12
2 parents b00d865 + e90b000 commit dedd109

12 files changed

+122
-136
lines changed
 

‎.travis.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ os:
44
- osx
55
language: node_js
66
node_js:
7-
- node
8-
- '9'
7+
- '10'
98
- '8'
10-
- '7'
119
- '6'
12-
- '5'
1310
- '4'
14-
- '0.12'
15-
- '0.10'

‎appveyor.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
environment:
33
matrix:
44
# node.js
5+
- nodejs_version: "10.0"
56
- nodejs_version: "8.0"
6-
- nodejs_version: "7.0"
77
- nodejs_version: "6.0"
8-
- nodejs_version: "5.0"
9-
- nodejs_version: "0.12"
10-
- nodejs_version: "0.10"
8+
- nodejs_version: "4.0"
119

1210
# Install scripts. (runs after repo cloning)
1311
install:

‎gulpfile.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
'use strict';
22

3-
var gulp = require('gulp');
4-
var mocha = require('gulp-mocha');
5-
var unused = require('gulp-unused');
6-
var istanbul = require('gulp-istanbul');
7-
var eslint = require('gulp-eslint');
3+
const gulp = require('gulp');
4+
const mocha = require('gulp-mocha');
5+
const unused = require('gulp-unused');
6+
const istanbul = require('gulp-istanbul');
7+
const eslint = require('gulp-eslint');
88

99
gulp.task('coverage', function() {
1010
return gulp.src(['index.js', 'lib/*.js'])

‎index.js

+33-34
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,25 @@
44
* Module dependencies
55
*/
66

7-
var extend = require('extend-shallow');
8-
var unique = require('array-unique');
9-
var toRegex = require('to-regex');
7+
const unique = require('array-unique');
8+
const toRegex = require('to-regex');
109

1110
/**
1211
* Local dependencies
1312
*/
1413

15-
var compilers = require('./lib/compilers');
16-
var parsers = require('./lib/parsers');
17-
var Extglob = require('./lib/extglob');
18-
var utils = require('./lib/utils');
19-
var MAX_LENGTH = 1024 * 64;
14+
const compilers = require('./lib/compilers');
15+
const parsers = require('./lib/parsers');
16+
const Extglob = require('./lib/extglob');
17+
const utils = require('./lib/utils');
18+
const MAX_LENGTH = 1024 * 64;
2019

2120
/**
2221
* Convert the given `extglob` pattern into a regex-compatible string. Returns
2322
* an object with the compiled result and the parsed AST.
2423
*
2524
* ```js
26-
* var extglob = require('extglob');
25+
* const extglob = require('extglob');
2726
* console.log(extglob('*.!(*a)'));
2827
* //=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?'
2928
* ```
@@ -42,7 +41,7 @@ function extglob(pattern, options) {
4241
* array that contains only the strings that match the pattern.
4342
*
4443
* ```js
45-
* var extglob = require('extglob');
44+
* const extglob = require('extglob');
4645
* console.log(extglob.match(['a.a', 'a.b', 'a.c'], '*.!(*a)'));
4746
* //=> ['a.b', 'a.c']
4847
* ```
@@ -59,13 +58,13 @@ extglob.match = function(list, pattern, options) {
5958
}
6059

6160
list = utils.arrayify(list);
62-
var isMatch = extglob.matcher(pattern, options);
63-
var len = list.length;
64-
var idx = -1;
65-
var matches = [];
61+
const isMatch = extglob.matcher(pattern, options);
62+
const len = list.length;
63+
let idx = -1;
64+
const matches = [];
6665

6766
while (++idx < len) {
68-
var ele = list[idx];
67+
const ele = list[idx];
6968

7069
if (isMatch(ele)) {
7170
matches.push(ele);
@@ -94,7 +93,7 @@ extglob.match = function(list, pattern, options) {
9493
* extglob `pattern`.
9594
*
9695
* ```js
97-
* var extglob = require('extglob');
96+
* const extglob = require('extglob');
9897
*
9998
* console.log(extglob.isMatch('a.a', '*.!(*a)'));
10099
* //=> false
@@ -125,7 +124,7 @@ extglob.isMatch = function(str, pattern, options) {
125124
return pattern === str;
126125
}
127126

128-
var isMatch = utils.memoize('isMatch', pattern, options, extglob.matcher);
127+
const isMatch = utils.memoize('isMatch', pattern, options, extglob.matcher);
129128
return isMatch(str);
130129
};
131130

@@ -134,7 +133,7 @@ extglob.isMatch = function(str, pattern, options) {
134133
* the pattern can match any part of the string.
135134
*
136135
* ```js
137-
* var extglob = require('extglob');
136+
* const extglob = require('extglob');
138137
* console.log(extglob.contains('aa/bb/cc', '*b'));
139138
* //=> true
140139
* console.log(extglob.contains('aa/bb/cc', '*d'));
@@ -156,7 +155,7 @@ extglob.contains = function(str, pattern, options) {
156155
return pattern === str;
157156
}
158157

159-
var opts = extend({}, options, {contains: true});
158+
const opts = Object.assign({}, options, {contains: true});
160159
opts.strictClose = false;
161160
opts.strictOpen = false;
162161
return extglob.isMatch(str, pattern, opts);
@@ -167,8 +166,8 @@ extglob.contains = function(str, pattern, options) {
167166
* function takes the string to match as its only argument.
168167
*
169168
* ```js
170-
* var extglob = require('extglob');
171-
* var isMatch = extglob.matcher('*.!(*a)');
169+
* const extglob = require('extglob');
170+
* const isMatch = extglob.matcher('*.!(*a)');
172171
*
173172
* console.log(isMatch('a.a'));
174173
* //=> false
@@ -187,7 +186,7 @@ extglob.matcher = function(pattern, options) {
187186
}
188187

189188
function matcher() {
190-
var re = extglob.makeRe(pattern, options);
189+
const re = extglob.makeRe(pattern, options);
191190
return function(str) {
192191
return re.test(str);
193192
};
@@ -201,7 +200,7 @@ extglob.matcher = function(pattern, options) {
201200
* an object with the compiled result and the parsed AST.
202201
*
203202
* ```js
204-
* var extglob = require('extglob');
203+
* const extglob = require('extglob');
205204
* console.log(extglob.create('*.!(*a)').output);
206205
* //=> '(?!\\.)[^/]*?\\.(?!(?!\\.)[^/]*?a\\b).*?'
207206
* ```
@@ -217,8 +216,8 @@ extglob.create = function(pattern, options) {
217216
}
218217

219218
function create() {
220-
var ext = new Extglob(options);
221-
var ast = ext.parse(pattern, options);
219+
const ext = new Extglob(options);
220+
const ast = ext.parse(pattern, options);
222221
return ext.compile(ast, options);
223222
}
224223

@@ -230,7 +229,7 @@ extglob.create = function(pattern, options) {
230229
* if the pattern did not match.
231230
*
232231
* ```js
233-
* var extglob = require('extglob');
232+
* const extglob = require('extglob');
234233
* extglob.capture(pattern, string[, options]);
235234
*
236235
* console.log(extglob.capture('test/*.js', 'test/foo.js'));
@@ -246,11 +245,11 @@ extglob.create = function(pattern, options) {
246245
*/
247246

248247
extglob.capture = function(pattern, str, options) {
249-
var re = extglob.makeRe(pattern, extend({capture: true}, options));
248+
const re = extglob.makeRe(pattern, Object.assign({capture: true}, options));
250249

251250
function match() {
252251
return function(string) {
253-
var match = re.exec(string);
252+
const match = re.exec(string);
254253
if (!match) {
255254
return null;
256255
}
@@ -259,16 +258,16 @@ extglob.capture = function(pattern, str, options) {
259258
};
260259
}
261260

262-
var capture = utils.memoize('capture', pattern, options, match);
261+
const capture = utils.memoize('capture', pattern, options, match);
263262
return capture(str);
264263
};
265264

266265
/**
267266
* Create a regular expression from the given `pattern` and `options`.
268267
*
269268
* ```js
270-
* var extglob = require('extglob');
271-
* var re = extglob.makeRe('*.!(*a)');
269+
* const extglob = require('extglob');
270+
* const re = extglob.makeRe('*.!(*a)');
272271
* console.log(re);
273272
* //=> /^[^\/]*?\.(?![^\/]*?a)[^\/]*?$/
274273
* ```
@@ -292,13 +291,13 @@ extglob.makeRe = function(pattern, options) {
292291
}
293292

294293
function makeRe() {
295-
var opts = extend({strictErrors: false}, options);
294+
const opts = Object.assign({strictErrors: false}, options);
296295
if (opts.strictErrors === true) opts.strict = true;
297-
var res = extglob.create(pattern, opts);
296+
const res = extglob.create(pattern, opts);
298297
return toRegex(res.output, opts);
299298
}
300299

301-
var regex = utils.memoize('makeRe', pattern, options, makeRe);
300+
const regex = utils.memoize('makeRe', pattern, options, makeRe);
302301
if (regex.source.length > MAX_LENGTH) {
303302
throw new SyntaxError('potentially malicious regex detected');
304303
}

‎lib/compilers.js

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
var brackets = require('expand-brackets');
3+
const brackets = require('expand-brackets');
44

55
/**
66
* Extglob compilers
@@ -45,11 +45,11 @@ module.exports = function(extglob) {
4545
*/
4646

4747
.set('qmark', function(node) {
48-
var val = '[^\\\\/.]';
49-
var prev = this.prev();
48+
let val = '[^\\\\/.]';
49+
const prev = node.prev;
5050

5151
if (node.parsed.slice(-1) === '(') {
52-
var ch = node.rest.charAt(0);
52+
const ch = node.rest.charAt(0);
5353
if (ch !== '!' && ch !== '=' && ch !== ':') {
5454
return this.emit(val, node);
5555
}
@@ -71,11 +71,11 @@ module.exports = function(extglob) {
7171
*/
7272

7373
.set('plus', function(node) {
74-
var prev = node.parsed.slice(-1);
74+
const prev = node.parsed.slice(-1);
7575
if (prev === ']' || prev === ')') {
7676
return this.emit(node.val, node);
7777
}
78-
var ch = this.output.slice(-1);
78+
const ch = this.output.slice(-1);
7979
if (!this.output || (/[?*+]/.test(ch) && node.parent.type !== 'bracket')) {
8080
return this.emit('\\+', node);
8181
}
@@ -90,8 +90,8 @@ module.exports = function(extglob) {
9090
*/
9191

9292
.set('star', function(node) {
93-
var prev = this.prev();
94-
var prefix = prev.type !== 'text' && prev.type !== 'escape'
93+
const prev = node.prev;
94+
const prefix = prev.type !== 'text' && prev.type !== 'escape'
9595
? '(?!\\.)'
9696
: '';
9797

@@ -103,10 +103,10 @@ module.exports = function(extglob) {
103103
*/
104104

105105
.set('paren', function(node) {
106-
return this.mapVisit(node.nodes);
106+
this.mapVisit(node);
107107
})
108108
.set('paren.open', function(node) {
109-
var capture = this.options.capture ? '(' : '';
109+
const capture = this.options.capture ? '(' : '';
110110

111111
switch (node.parent.prefix) {
112112
case '!':
@@ -118,7 +118,7 @@ module.exports = function(extglob) {
118118
case '@':
119119
return this.emit(capture + '(?:', node);
120120
default: {
121-
var val = node.val;
121+
let val = node.val;
122122
if (this.options.bash === true) {
123123
val = '\\' + val;
124124
} else if (!this.options.capture && val === '(' && node.parent.rest[0] !== '?') {
@@ -130,13 +130,13 @@ module.exports = function(extglob) {
130130
}
131131
})
132132
.set('paren.close', function(node) {
133-
var capture = this.options.capture ? ')' : '';
133+
const capture = this.options.capture ? ')' : '';
134134

135135
switch (node.prefix) {
136136
case '!':
137137
case '^':
138-
var prefix = /^(\)|$)/.test(node.rest) ? '$' : '';
139-
var str = star.call(this, node);
138+
const prefix = /^(\)|$)/.test(node.rest) ? '$' : '';
139+
let str = star.call(this, node);
140140

141141
// if the extglob has a slash explicitly defined, we know the user wants
142142
// to match slashes, so we need to ensure the "star" regex allows for it
@@ -152,7 +152,7 @@ module.exports = function(extglob) {
152152
case '@':
153153
return this.emit(')' + capture, node);
154154
default: {
155-
var val = (this.options.bash === true ? '\\' : '') + ')';
155+
const val = (this.options.bash === true ? '\\' : '') + ')';
156156
return this.emit(val, node);
157157
}
158158
}
@@ -163,7 +163,7 @@ module.exports = function(extglob) {
163163
*/
164164

165165
.set('text', function(node) {
166-
var val = node.val.replace(/[\[\]]/g, '\\$&');
166+
const val = node.val.replace(/[\[\]]/g, '\\$&');
167167
return this.emit(val, node);
168168
});
169169
};

‎lib/extglob.js

+11-10
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,25 @@
44
* Module dependencies
55
*/
66

7-
var Snapdragon = require('snapdragon');
8-
var define = require('define-property');
9-
var extend = require('extend-shallow');
7+
const Snapdragon = require('snapdragon');
8+
const capture = require('snapdragon-capture');
9+
const define = require('define-property');
1010

1111
/**
1212
* Local dependencies
1313
*/
1414

15-
var compilers = require('./compilers');
16-
var parsers = require('./parsers');
15+
const compilers = require('./compilers');
16+
const parsers = require('./parsers');
1717

1818
/**
1919
* Customize Snapdragon parser and renderer
2020
*/
2121

2222
function Extglob(options) {
23-
this.options = extend({source: 'extglob'}, options);
23+
this.options = Object.assign({source: 'extglob'}, options);
2424
this.snapdragon = this.options.snapdragon || new Snapdragon(this.options);
25+
this.snapdragon.use(capture());
2526
this.snapdragon.patterns = this.snapdragon.patterns || {};
2627
this.compiler = this.snapdragon.compiler;
2728
this.parser = this.snapdragon.parser;
@@ -34,15 +35,15 @@ function Extglob(options) {
3435
*/
3536

3637
define(this.snapdragon, 'parse', function(str, options) {
37-
var parsed = Snapdragon.prototype.parse.apply(this, arguments);
38+
const parsed = Snapdragon.prototype.parse.apply(this, arguments);
3839
parsed.input = str;
3940

4041
// escape unmatched brace/bracket/parens
41-
var last = this.parser.stack.pop();
42+
const last = this.parser.stack.pop();
4243
if (last && this.options.strict !== true) {
43-
var node = last.nodes[0];
44+
const node = last.nodes[0];
4445
node.val = '\\' + node.val;
45-
var sibling = node.parent.nodes[1];
46+
const sibling = node.parent.nodes[1];
4647
if (sibling.type === 'star') {
4748
sibling.loose = true;
4849
}

‎lib/parsers.js

+33-41
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
'use strict';
22

3-
var brackets = require('expand-brackets');
4-
var define = require('define-property');
5-
var utils = require('./utils');
3+
const brackets = require('expand-brackets');
4+
const utils = require('./utils');
65

76
/**
87
* Characters to use in text regex (we want to "not" match
98
* characters that are matched by other parsers)
109
*/
1110

12-
var TEXT_REGEX = '([!@*?+]?\\(|\\)|[*?.+\\\\]|\\[:?(?=.*\\])|:?\\])+';
13-
var not = utils.createRegex(TEXT_REGEX);
11+
const TEXT_REGEX = '([!@*?+]?\\(|\\)|[*?.+\\\\]|\\[:?(?=.*\\])|:?\\])+';
12+
const not = utils.createRegex(TEXT_REGEX);
1413

1514
/**
1615
* Extglob parsers
@@ -31,26 +30,24 @@ function parsers(extglob) {
3130
* Extglob open: "*("
3231
*/
3332

34-
.capture('paren.open', function() {
35-
var parsed = this.parsed;
36-
var pos = this.position();
37-
var m = this.match(/^([!@*?+])?\(/);
33+
.set('paren.open', function() {
34+
const pos = this.position();
35+
const m = this.match(/^([!@*?+])?\(/);
3836
if (!m) return;
3937

40-
var prev = this.prev();
41-
var prefix = m[1];
42-
var val = m[0];
38+
const prev = this.prev();
39+
const prefix = m[1];
40+
const val = m[0];
4341

44-
var open = pos({
42+
const open = pos({
4543
type: 'paren.open',
46-
parsed: parsed,
47-
val: val
44+
val
4845
});
4946

50-
var node = pos({
47+
const node = pos({
5148
type: 'paren',
52-
prefix: prefix,
53-
nodes: [open]
49+
prefix,
50+
nodes: []
5451
});
5552

5653
// if nested negation extglobs, just cancel them out to simplify
@@ -59,30 +56,26 @@ function parsers(extglob) {
5956
node.prefix = '@';
6057
}
6158

62-
define(node, 'rest', this.input);
63-
define(node, 'parsed', parsed);
64-
define(node, 'parent', prev);
65-
define(open, 'parent', node);
66-
59+
this.pushNode(node, prev);
60+
this.pushNode(open, node);
6761
this.push('paren', node);
68-
prev.nodes.push(node);
6962
})
7063

7164
/**
7265
* Extglob close: ")"
7366
*/
7467

75-
.capture('paren.close', function() {
76-
var parsed = this.parsed;
77-
var pos = this.position();
78-
var m = this.match(/^\)/);
68+
.set('paren.close', function() {
69+
const parsed = this.parsed;
70+
const pos = this.position();
71+
const m = this.match(/^\)/);
7972
if (!m) return;
8073

81-
var parent = this.pop('paren');
82-
var node = pos({
74+
const parent = this.pop('paren');
75+
const node = pos({
8376
type: 'paren.close',
8477
rest: this.input,
85-
parsed: parsed,
78+
parsed,
8679
val: m[0]
8780
});
8881

@@ -95,17 +88,16 @@ function parsers(extglob) {
9588
}
9689

9790
node.prefix = parent.prefix;
98-
parent.nodes.push(node);
99-
define(node, 'parent', parent);
91+
this.pushNode(node, parent);
10092
})
10193

10294
/**
10395
* Escape: "\\."
10496
*/
10597

106-
.capture('escape', function() {
107-
var pos = this.position();
108-
var m = this.match(/^\\(.)/);
98+
.set('escape', function() {
99+
const pos = this.position();
100+
const m = this.match(/^\\(.)/);
109101
if (!m) return;
110102

111103
return pos({
@@ -119,16 +111,16 @@ function parsers(extglob) {
119111
* Question marks: "?"
120112
*/
121113

122-
.capture('qmark', function() {
123-
var parsed = this.parsed;
124-
var pos = this.position();
125-
var m = this.match(/^\?+(?!\()/);
114+
.set('qmark', function() {
115+
const parsed = this.parsed;
116+
const pos = this.position();
117+
const m = this.match(/^\?+(?!\()/);
126118
if (!m) return;
127119
extglob.state.metachar = true;
128120
return pos({
129121
type: 'qmark',
130122
rest: this.input,
131-
parsed: parsed,
123+
parsed,
132124
val: m[0]
133125
});
134126
})

‎lib/utils.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
'use strict';
22

3-
var regex = require('regex-not');
4-
var Cache = require('fragment-cache');
3+
const regex = require('regex-not');
4+
const Cache = require('fragment-cache');
55

66
/**
77
* Utils
88
*/
99

10-
var utils = module.exports;
11-
var cache = utils.cache = new Cache();
10+
const utils = module.exports;
11+
const cache = utils.cache = new Cache();
1212

1313
/**
1414
* Cast `val` to an array
@@ -27,13 +27,13 @@ utils.arrayify = function(val) {
2727
*/
2828

2929
utils.memoize = function(type, pattern, options, fn) {
30-
var key = utils.createKey(type + pattern, options);
30+
const key = utils.createKey(type + pattern, options);
3131

3232
if (cache.has(type, key)) {
3333
return cache.get(type, key);
3434
}
3535

36-
var val = fn(pattern, options);
36+
const val = fn(pattern, options);
3737
if (options && options.cache === false) {
3838
return val;
3939
}
@@ -49,11 +49,11 @@ utils.memoize = function(type, pattern, options, fn) {
4949
*/
5050

5151
utils.createKey = function(pattern, options) {
52-
var key = pattern;
52+
let key = pattern;
5353
if (typeof options === 'undefined') {
5454
return key;
5555
}
56-
for (var prop in options) {
56+
for (const prop in options) {
5757
key += ';' + prop + '=' + String(options[prop]);
5858
}
5959
return key;
@@ -64,6 +64,6 @@ utils.createKey = function(pattern, options) {
6464
*/
6565

6666
utils.createRegex = function(str) {
67-
var opts = {contains: true, strictClose: false};
67+
const opts = {contains: true, strictClose: false};
6868
return regex(str, opts);
6969
};

‎package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"Isiah Meadows (https://www.isiahmeadows.com)",
1111
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
1212
"Matt Bierner (http://mattbierner.com)",
13-
"Shinnosuke Watanabe (https://shinnn.github.io)"
13+
"Shinnosuke Watanabe (https://shinnn.github.io)",
14+
"Daniel Tschinder (https://github.com/danez)"
1415
],
1516
"repository": "micromatch/extglob",
1617
"bugs": {
@@ -23,19 +24,19 @@
2324
],
2425
"main": "index.js",
2526
"engines": {
26-
"node": ">=0.10.0"
27+
"node": ">=4.0.0"
2728
},
2829
"scripts": {
2930
"test": "mocha"
3031
},
3132
"dependencies": {
3233
"array-unique": "^0.3.2",
33-
"define-property": "^1.0.0",
34-
"expand-brackets": "^2.1.4",
35-
"extend-shallow": "^2.0.1",
34+
"define-property": "^2.0.2",
35+
"expand-brackets": "^4.0.0",
3636
"fragment-cache": "^0.2.1",
3737
"regex-not": "^1.0.0",
38-
"snapdragon": "^0.8.1",
38+
"snapdragon": "^0.12.0",
39+
"snapdragon-capture": "^0.2.0",
3940
"to-regex": "^3.0.1"
4041
},
4142
"devDependencies": {

‎test/_negations.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module.exports = {
5252
'asd.jss.xyz': {
5353
'*.!(js)*.!(xy)': false,
5454
'*.!(js)*.!(xy)*': false,
55-
'*.!(js).!(xy)': false,
55+
'*.!(js).!(xy)': false
5656
},
5757

5858
'asd.jss.xy': {
@@ -102,8 +102,8 @@ module.exports = {
102102
'*.!(js)+': false,
103103
'!(*(.js.js))': true,
104104
'*.!(js)': true,
105-
'*.!(js)*': false, // Bash 4.3 disagrees!
106-
'*.!(js)*.js': false // Bash 4.3 disagrees!
105+
'*.!(js)*': false, // Bash 4.3 disagrees!
106+
'*.!(js)*.js': false // Bash 4.3 disagrees!
107107
},
108108

109109
'a/foo.js.js': {

‎test/bash.extglob2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe('bash extglob2 tests', function() {
5858
[ 'foo', '!(foo)*', false ], // Bash 4.3 disagrees!
5959
[ 'foobar', '!(foo)', true ],
6060
[ 'foobar', '!(foo)*', false ], // Bash 4.3 disagrees!
61-
[ 'moo.cow', '!(*.*).!(*.*)', false ], // Bash 4.3 disagrees!
61+
[ 'moo.cow', '!(*.*).!(*.*)', false ], // Bash 4.3 disagrees!
6262
[ 'mad.moo.cow', '!(*.*).!(*.*)', false ],
6363
[ 'mucca.pazza', 'mu!(*(c))?.pa!(*(z))?', false ],
6464
[ 'fff', '!(f)', true ],

‎test/reference.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var negations = require('./_negations');
88

99
describe('running extglob against minimatch tests', function() {
1010
forOwn(negations, function(val, fixture) {
11-
if (fixture !== 'asd.jss.xyz') return
11+
if (fixture !== 'asd.jss.xyz') return;
1212
describe('"' + fixture + '"', function() {
1313
forOwn(val, function(expected, pattern) {
1414
var exp = expected === false ? ' not' : '';

0 commit comments

Comments
 (0)
Please sign in to comment.