micromatch 3.1.6 → 3.1.10

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/README.md CHANGED
@@ -537,7 +537,7 @@ console.log(ast);
537
537
  // { type: 'eos', val: '' } ] }
538
538
  ```
539
539
 
540
- ### [.compile](index.js#L785)
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#L806)
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 October 20, 2017 (longer bars are better):
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
- | 443 | [jonschlinkert](https://github.com/jonschlinkert) |
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 | [olstenlarck-old](https://github.com/olstenlarck-old) |
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 © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
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 October 20, 2017._
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 a string');
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) return [pattern];
625
- if (!/\{.*\}/.test(pattern)) return [pattern];
626
- // if (/[!@*?+]\{/.test(pattern)) {
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/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(filepath) || re.test(path.basename(filepath));
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.6",
4
+ "version": "3.1.10",
5
5
  "homepage": "https://github.com/micromatch/micromatch",
6
6
  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
7
  "contributors": [
@@ -48,7 +48,7 @@
48
48
  "object.pick": "^1.3.0",
49
49
  "regex-not": "^1.0.0",
50
50
  "snapdragon": "^0.8.1",
51
- "to-regex": "^3.0.1"
51
+ "to-regex": "^3.0.2"
52
52
  },
53
53
  "devDependencies": {
54
54
  "bash-match": "^1.0.2",