micromatch 4.0.4 → 4.0.5

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
@@ -1,4 +1,4 @@
1
- # micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![NPM total downloads](https://img.shields.io/npm/dt/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Linux Build Status](https://img.shields.io/travis/micromatch/micromatch.svg?style=flat&label=Travis)](https://travis-ci.org/micromatch/micromatch)
1
+ # micromatch [![NPM version](https://img.shields.io/npm/v/micromatch.svg?style=flat)](https://www.npmjs.com/package/micromatch) [![NPM monthly downloads](https://img.shields.io/npm/dm/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![NPM total downloads](https://img.shields.io/npm/dt/micromatch.svg?style=flat)](https://npmjs.org/package/micromatch) [![Tests](https://github.com/micromatch/micromatch/actions/workflows/test.yml/badge.svg)](https://github.com/micromatch/micromatch/actions/workflows/test.yml)
2
2
 
3
3
  > Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.
4
4
 
@@ -54,7 +54,7 @@ Please consider following this project's author, [Jon Schlinkert](https://github
54
54
 
55
55
  ## Install
56
56
 
57
- Install with [npm](https://www.npmjs.com/):
57
+ Install with [npm](https://www.npmjs.com/) (requires [Node.js](https://nodejs.org/en/) >=8.6):
58
58
 
59
59
  ```sh
60
60
  $ npm install --save micromatch
@@ -103,7 +103,7 @@ console.log(micromatch.isMatch('foo', ['b*', 'f*'])) //=> true
103
103
 
104
104
  * Support for multiple glob patterns (no need for wrappers like multimatch)
105
105
  * Wildcards (`**`, `*.js`)
106
- * Negation (`'!a/*.js'`, `'*!(b).js']`)
106
+ * Negation (`'!a/*.js'`, `'*!(b).js'`)
107
107
  * [extglobs](#extglobs) (`+(x|y)`, `!(a|b)`)
108
108
  * [POSIX character classes](#posix-bracket-expressions) (`[[:alpha:][:digit:]]`)
109
109
  * [brace expansion](https://github.com/micromatch/braces) (`foo/{1..5}.md`, `bar/{a,b,c}.js`)
@@ -419,7 +419,7 @@ Parse a glob pattern to create the source string for a regular expression.
419
419
 
420
420
  ```js
421
421
  const mm = require('micromatch');
422
- const state = mm(pattern[, options]);
422
+ const state = mm.parse(pattern[, options]);
423
423
  ```
424
424
 
425
425
  ### [.braces](index.js#L446)
@@ -845,7 +845,7 @@ $ npm run bench
845
845
 
846
846
  ### Latest results
847
847
 
848
- As of April 10, 2021 (longer bars are better):
848
+ As of March 24, 2022 (longer bars are better):
849
849
 
850
850
  ```sh
851
851
  # .makeRe star
@@ -963,17 +963,18 @@ You might also be interested in these projects:
963
963
 
964
964
  | **Commits** | **Contributor** |
965
965
  | --- | --- |
966
- | 508 | [jonschlinkert](https://github.com/jonschlinkert) |
966
+ | 512 | [jonschlinkert](https://github.com/jonschlinkert) |
967
967
  | 12 | [es128](https://github.com/es128) |
968
+ | 9 | [danez](https://github.com/danez) |
968
969
  | 8 | [doowb](https://github.com/doowb) |
969
970
  | 6 | [paulmillr](https://github.com/paulmillr) |
970
971
  | 5 | [mrmlnc](https://github.com/mrmlnc) |
971
- | 4 | [danez](https://github.com/danez) |
972
972
  | 3 | [DrPizza](https://github.com/DrPizza) |
973
973
  | 2 | [TrySound](https://github.com/TrySound) |
974
974
  | 2 | [mceIdo](https://github.com/mceIdo) |
975
975
  | 2 | [Glazy](https://github.com/Glazy) |
976
976
  | 2 | [MartinKolarik](https://github.com/MartinKolarik) |
977
+ | 2 | [antonyk](https://github.com/antonyk) |
977
978
  | 2 | [Tvrqvoise](https://github.com/Tvrqvoise) |
978
979
  | 1 | [amilajack](https://github.com/amilajack) |
979
980
  | 1 | [Cslove](https://github.com/Cslove) |
@@ -981,11 +982,13 @@ You might also be interested in these projects:
981
982
  | 1 | [DianeLooney](https://github.com/DianeLooney) |
982
983
  | 1 | [UltCombo](https://github.com/UltCombo) |
983
984
  | 1 | [frangio](https://github.com/frangio) |
985
+ | 1 | [joyceerhl](https://github.com/joyceerhl) |
984
986
  | 1 | [juszczykjakub](https://github.com/juszczykjakub) |
985
987
  | 1 | [muescha](https://github.com/muescha) |
986
988
  | 1 | [sebdeckers](https://github.com/sebdeckers) |
987
989
  | 1 | [tomByrer](https://github.com/tomByrer) |
988
990
  | 1 | [fidian](https://github.com/fidian) |
991
+ | 1 | [curbengh](https://github.com/curbengh) |
989
992
  | 1 | [simlu](https://github.com/simlu) |
990
993
  | 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
991
994
  | 1 | [yvele](https://github.com/yvele) |
@@ -1000,9 +1003,9 @@ You might also be interested in these projects:
1000
1003
 
1001
1004
  ### License
1002
1005
 
1003
- Copyright © 2021, [Jon Schlinkert](https://github.com/jonschlinkert).
1006
+ Copyright © 2022, [Jon Schlinkert](https://github.com/jonschlinkert).
1004
1007
  Released under the [MIT License](LICENSE).
1005
1008
 
1006
1009
  ***
1007
1010
 
1008
- _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on April 10, 2021._
1011
+ _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on March 24, 2022._
package/index.js CHANGED
@@ -155,10 +155,10 @@ micromatch.not = (list, patterns, options = {}) => {
155
155
  items.push(state.output);
156
156
  };
157
157
 
158
- let matches = micromatch(list, patterns, { ...options, onResult });
158
+ let matches = new Set(micromatch(list, patterns, { ...options, onResult }));
159
159
 
160
160
  for (let item of items) {
161
- if (!matches.includes(item)) {
161
+ if (!matches.has(item)) {
162
162
  result.add(item);
163
163
  }
164
164
  }
@@ -408,7 +408,7 @@ micromatch.scan = (...args) => picomatch.scan(...args);
408
408
  *
409
409
  * ```js
410
410
  * const mm = require('micromatch');
411
- * const state = mm(pattern[, options]);
411
+ * const state = mm.parse(pattern[, options]);
412
412
  * ```
413
413
  * @param {String} `glob`
414
414
  * @param {Object} `options`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "micromatch",
3
3
  "description": "Glob matching for javascript/node.js. A replacement and faster alternative to minimatch and multimatch.",
4
- "version": "4.0.4",
4
+ "version": "4.0.5",
5
5
  "homepage": "https://github.com/micromatch/micromatch",
6
6
  "author": "Jon Schlinkert (https://github.com/jonschlinkert)",
7
7
  "contributors": [
@@ -37,14 +37,14 @@
37
37
  "test": "mocha"
38
38
  },
39
39
  "dependencies": {
40
- "braces": "^3.0.1",
41
- "picomatch": "^2.2.3"
40
+ "braces": "^3.0.2",
41
+ "picomatch": "^2.3.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "fill-range": "^7.0.1",
45
45
  "gulp-format-md": "^2.0.0",
46
- "minimatch": "^3.0.4",
47
- "mocha": "^7.2.0",
46
+ "minimatch": "^5.0.1",
47
+ "mocha": "^9.2.2",
48
48
  "time-require": "github:jonschlinkert/time-require"
49
49
  },
50
50
  "keywords": [
package/CHANGELOG.md DELETED
@@ -1,109 +0,0 @@
1
- # Release history
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
- and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
-
8
- <details>
9
- <summary><strong>Guiding Principles</strong></summary>
10
-
11
- - Changelogs are for humans, not machines.
12
- - There should be an entry for every single version.
13
- - The same types of changes should be grouped.
14
- - Versions and sections should be linkable.
15
- - The latest version comes first.
16
- - The release date of each versions is displayed.
17
- - Mention whether you follow Semantic Versioning.
18
-
19
- </details>
20
-
21
- <details>
22
- <summary><strong>Types of changes</strong></summary>
23
-
24
- Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
25
-
26
- - `Added` for new features.
27
- - `Changed` for changes in existing functionality.
28
- - `Deprecated` for soon-to-be removed features.
29
- - `Removed` for now removed features.
30
- - `Fixed` for any bug fixes.
31
- - `Security` in case of vulnerabilities.
32
-
33
- </details>
34
-
35
- ## [4.0.0] - 2019-03-20
36
-
37
- ### Added
38
-
39
- - Adds support for `options.onMatch`. See the readme for details
40
- - Adds support for `options.onIgnore`. See the readme for details
41
- - Adds support for `options.onResult`. See the readme for details
42
-
43
-
44
- ### Breaking changes
45
-
46
- - Require Node.js >= 8.6
47
- - Removed support for passing an array of brace patterns to `micromatch.braces()`.
48
- - To strictly enforce closing brackets (for `{`, `[`, and `(`), you must now use `strictBrackets=true` instead of `strictErrors`.
49
- - `cache` - caching and all related options and methods have been removed
50
- - `options.unixify` was renamed to `options.windows`
51
- - `options.nodupes` Was removed. Duplicates are always removed by default. You can override this with custom behavior by using the `onMatch`, `onResult` and `onIgnore` functions.
52
- - `options.snapdragon` was removed, as snapdragon is no longer used.
53
- - `options.sourcemap` was removed, as snapdragon is no longer used, which provided sourcemap support.
54
-
55
- ## [3.0.0] - 2017-04-11
56
-
57
- Complete overhaul, with 36,000+ new unit tests validated against actual output generated by Bash and minimatch. More specifically, 35,000+ of the tests:
58
-
59
- - micromatch results are directly compared to bash results
60
- - in rare cases, when micromatch and bash disagree, micromatch's results are compared to minimatch's results
61
- - micromatch is much more accurate than minimatch, so there were cases where I had to make assumptions. I'll try to document these.
62
-
63
- This refactor introduces a parser and compiler that are supersets of more granular parsers and compilers from other sub-modules. Each of these sub-modules has a singular responsibility and focuses on a certain type of matching that aligns with a specific part of the Bash "expansion" API.
64
-
65
- These sub-modules work like plugins to seamlessly create the micromatch parser/compiler, so that strings are parsed in one pass, an [AST is created](https://gist.github.com/jonschlinkert/099c8914f56529f75bc757cc9e5e8e2a), then a new string is generated by the compiler.
66
-
67
- Here are those sub-modules with links to related prs on those modules if you want to see how they contribute to this code:
68
-
69
- [nanomatch](https://github.com/jonschlinkert/nanomatch) (new library) - glob expansion (`*`, `**`, `?` and `[...]`))
70
- [braces](https://github.com/jonschlinkert/braces/pull/10) - brace expansion (`{1..10}`, `{a,b,c}`, etc)
71
- [extglob](https://github.com/jonschlinkert/extglob/pull/5) - extended globs (`!(a|b)`, `@(!(foo|bar))`, etc)
72
- [expand-brackets](https://github.com/jonschlinkert/expand-brackets/pull/5) - POSIX character classes `[[:alpha:][:digit:]]`
73
-
74
- **Added**
75
-
76
- - source map support (optionally created when using parse or compile - I have no idea what the use case is yet, but they come for free) (note that source maps are not generated for brace expansion at present, since the braces compiler uses a different strategy. I'll update if/when this changes).
77
- - parser is exposed, so that implementors can customize or override specific micromatch parsers if necessary
78
- - compiler is exposed, so that implementors can customize or override specific micromatch compilers if necessary
79
-
80
- **Fixed**
81
-
82
- - more accurate matching (passes 100% of Bash 4.3 of the brace expansion and extglob unit tests, as well as all Bash glob tests that are relevant to node.js usage, all minimatch tests, all brace-expansion tests, and also passes a couple of tests that bash fails)
83
- - even safer - micromatch has always generated optimized patterns so it's not subject to DoS exploits like minimatch (completely different than the regex DoS issue, minimatch and multimatch are still openly exposed to being used for DoS attacks), but more safeguards were built into this refactor
84
-
85
- **Changed**
86
-
87
- - the public API of this library did not change in this version and should be safe to upgrade without changing implentor code. However, we have released this as a major version for the following reasons:
88
- - out of an abundance of caution due to the large amount of code changed in this release
89
- - we have improved parser accuracy to such a degree that some implementors using invalid globs have noted change in behavior. If this is the case for you, please check that you are using a valid glob expression before logging a bug with this library
90
-
91
- ## [1.0.1] - 2016-12-12
92
-
93
- **Added**
94
-
95
- - Support for windows path edge cases where backslashes are used in brackets or other unusual combinations.
96
-
97
- ## [1.0.0] - 2016-12-12
98
-
99
- Stable release.
100
-
101
- ## [0.1.0] - 2016-10-08
102
-
103
- First release.
104
-
105
-
106
- [Unreleased]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...HEAD
107
- [0.2.0]: https://github.com/jonschlinkert/micromatch/compare/0.1.0...0.2.0
108
-
109
- [keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog