micromatch 3.1.5 → 3.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of micromatch might be problematic. Click here for more details.
- package/LICENSE +1 -1
- package/README.md +9 -7
- package/index.js +5 -7
- package/lib/compilers.js +2 -2
- package/lib/utils.js +1 -1
- package/package.json +11 -11
package/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2014-
|
3
|
+
Copyright (c) 2014-2018, Jon Schlinkert.
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
@@ -537,7 +537,7 @@ console.log(ast);
|
|
537
537
|
// { type: 'eos', val: '' } ] }
|
538
538
|
```
|
539
539
|
|
540
|
-
### [.compile](index.js#
|
540
|
+
### [.compile](index.js#L780)
|
541
541
|
|
542
542
|
Compile the given `ast` or string with the given `options`.
|
543
543
|
|
@@ -571,7 +571,7 @@ console.log(mm.compile(ast));
|
|
571
571
|
// parsingErrors: [] }
|
572
572
|
```
|
573
573
|
|
574
|
-
### [.clearCache](index.js#
|
574
|
+
### [.clearCache](index.js#L801)
|
575
575
|
|
576
576
|
Clear the regex cache.
|
577
577
|
|
@@ -980,7 +980,7 @@ npm i -d && npm run benchmark
|
|
980
980
|
|
981
981
|
### Latest results
|
982
982
|
|
983
|
-
As of
|
983
|
+
As of February 18, 2018 (longer bars are better):
|
984
984
|
|
985
985
|
```sh
|
986
986
|
# braces-globstar-large-list (485691 bytes)
|
@@ -1117,14 +1117,15 @@ You might also be interested in these projects:
|
|
1117
1117
|
|
1118
1118
|
| **Commits** | **Contributor** |
|
1119
1119
|
| --- | --- |
|
1120
|
-
|
|
1120
|
+
| 457 | [jonschlinkert](https://github.com/jonschlinkert) |
|
1121
1121
|
| 12 | [es128](https://github.com/es128) |
|
1122
1122
|
| 8 | [doowb](https://github.com/doowb) |
|
1123
1123
|
| 3 | [paulmillr](https://github.com/paulmillr) |
|
1124
1124
|
| 2 | [TrySound](https://github.com/TrySound) |
|
1125
1125
|
| 2 | [MartinKolarik](https://github.com/MartinKolarik) |
|
1126
|
-
| 2 | [
|
1126
|
+
| 2 | [charlike-old](https://github.com/charlike-old) |
|
1127
1127
|
| 1 | [amilajack](https://github.com/amilajack) |
|
1128
|
+
| 1 | [mrmlnc](https://github.com/mrmlnc) |
|
1128
1129
|
| 1 | [devongovett](https://github.com/devongovett) |
|
1129
1130
|
| 1 | [DianeLooney](https://github.com/DianeLooney) |
|
1130
1131
|
| 1 | [UltCombo](https://github.com/UltCombo) |
|
@@ -1135,14 +1136,15 @@ You might also be interested in these projects:
|
|
1135
1136
|
|
1136
1137
|
**Jon Schlinkert**
|
1137
1138
|
|
1139
|
+
* [linkedin/in/jonschlinkert](https://linkedin.com/in/jonschlinkert)
|
1138
1140
|
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
1139
1141
|
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
1140
1142
|
|
1141
1143
|
### License
|
1142
1144
|
|
1143
|
-
Copyright ©
|
1145
|
+
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
|
1144
1146
|
Released under the [MIT License](LICENSE).
|
1145
1147
|
|
1146
1148
|
***
|
1147
1149
|
|
1148
|
-
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on
|
1150
|
+
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on February 18, 2018._
|
package/index.js
CHANGED
@@ -616,16 +616,14 @@ micromatch.makeRe = function(pattern, options) {
|
|
616
616
|
*/
|
617
617
|
|
618
618
|
micromatch.braces = function(pattern, options) {
|
619
|
-
if (typeof pattern !== 'string') {
|
620
|
-
throw new TypeError('expected
|
619
|
+
if (typeof pattern !== 'string' && !Array.isArray(pattern)) {
|
620
|
+
throw new TypeError('expected pattern to be an array or string');
|
621
621
|
}
|
622
622
|
|
623
623
|
function expand() {
|
624
|
-
if (options && options.nobrace === true
|
625
|
-
|
626
|
-
|
627
|
-
// options = utils.extend({}, options, {expand: true});
|
628
|
-
// }
|
624
|
+
if (options && options.nobrace === true || !/\{.*\}/.test(pattern)) {
|
625
|
+
return utils.arrayify(pattern);
|
626
|
+
}
|
629
627
|
return braces(pattern, options);
|
630
628
|
}
|
631
629
|
|
package/lib/compilers.js
CHANGED
@@ -29,7 +29,7 @@ module.exports = function(snapdragon) {
|
|
29
29
|
|
30
30
|
snapdragon.use(function() {
|
31
31
|
this.options.star = this.options.star || function(/*node*/) {
|
32
|
-
return '[
|
32
|
+
return '[^\\\\/]*?';
|
33
33
|
};
|
34
34
|
});
|
35
35
|
|
@@ -50,7 +50,7 @@ function escapeExtglobs(compiler) {
|
|
50
50
|
compiler.set('paren', function(node) {
|
51
51
|
var val = '';
|
52
52
|
visit(node, function(tok) {
|
53
|
-
if (tok.val) val += '\\' + tok.val;
|
53
|
+
if (tok.val) val += (/^\W/.test(tok.val) ? '\\' : '') + tok.val;
|
54
54
|
});
|
55
55
|
return this.emit(val, node);
|
56
56
|
});
|
package/lib/utils.js
CHANGED
@@ -269,7 +269,7 @@ utils.containsPattern = function(pattern, options) {
|
|
269
269
|
|
270
270
|
utils.matchBasename = function(re) {
|
271
271
|
return function(filepath) {
|
272
|
-
return re.test(
|
272
|
+
return re.test(path.basename(filepath));
|
273
273
|
};
|
274
274
|
};
|
275
275
|
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "micromatch",
|
3
3
|
"description": "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.",
|
4
|
-
"version": "3.1.
|
4
|
+
"version": "3.1.9",
|
5
5
|
"homepage": "https://github.com/micromatch/micromatch",
|
6
6
|
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
7
7
|
"contributors": [
|
@@ -38,13 +38,13 @@
|
|
38
38
|
"dependencies": {
|
39
39
|
"arr-diff": "^4.0.0",
|
40
40
|
"array-unique": "^0.3.2",
|
41
|
-
"braces": "^2.3.
|
42
|
-
"define-property": "^
|
43
|
-
"extend-shallow": "^
|
44
|
-
"extglob": "^2.0.
|
41
|
+
"braces": "^2.3.1",
|
42
|
+
"define-property": "^2.0.2",
|
43
|
+
"extend-shallow": "^3.0.2",
|
44
|
+
"extglob": "^2.0.4",
|
45
45
|
"fragment-cache": "^0.2.1",
|
46
|
-
"kind-of": "^6.0.
|
47
|
-
"nanomatch": "^1.2.
|
46
|
+
"kind-of": "^6.0.2",
|
47
|
+
"nanomatch": "^1.2.9",
|
48
48
|
"object.pick": "^1.3.0",
|
49
49
|
"regex-not": "^1.0.0",
|
50
50
|
"snapdragon": "^0.8.1",
|
@@ -55,13 +55,13 @@
|
|
55
55
|
"for-own": "^1.0.0",
|
56
56
|
"gulp": "^3.9.1",
|
57
57
|
"gulp-format-md": "^1.0.0",
|
58
|
-
"gulp-istanbul": "^1.1.
|
59
|
-
"gulp-mocha": "^
|
58
|
+
"gulp-istanbul": "^1.1.3",
|
59
|
+
"gulp-mocha": "^5.0.0",
|
60
60
|
"gulp-unused": "^0.2.1",
|
61
|
-
"is-windows": "^1.0.
|
61
|
+
"is-windows": "^1.0.2",
|
62
62
|
"minimatch": "^3.0.4",
|
63
63
|
"minimist": "^1.2.0",
|
64
|
-
"mocha": "^3.
|
64
|
+
"mocha": "^3.5.3",
|
65
65
|
"multimatch": "^2.1.0"
|
66
66
|
},
|
67
67
|
"keywords": [
|