minimatch 4.2.1 → 5.0.0

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.
package/README.md CHANGED
@@ -35,6 +35,20 @@ See:
35
35
  * `man 3 fnmatch`
36
36
  * `man 5 gitignore`
37
37
 
38
+ ## Windows
39
+
40
+ **Please only use forward-slashes in glob expressions.**
41
+
42
+ Though windows uses either `/` or `\` as its path separator, only `/`
43
+ characters are used by this glob implementation. You must use
44
+ forward-slashes **only** in glob expressions. Back-slashes in patterns
45
+ will always be interpreted as escape characters, not path separators.
46
+
47
+ Note that `\` or `/` _will_ be interpreted as path separators in paths on
48
+ Windows, and will match against `/` in glob expressions.
49
+
50
+ So just always use `/` in patterns.
51
+
38
52
  ## Minimatch Class
39
53
 
40
54
  Create a minimatch object by instantiating the `minimatch.Minimatch` class.
@@ -187,12 +201,6 @@ minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d
187
201
  minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a
188
202
  ```
189
203
 
190
- ### allowWindowsEscape
191
-
192
- Windows path separator `\` is by default converted to `/`, which
193
- prohibits the usage of `\` as a escape character. This flag skips that
194
- behavior and allows using the escape character.
195
-
196
204
  ## Comparisons to other fnmatch/glob implementations
197
205
 
198
206
  While strict compliance with the existing standards is a worthwhile
package/minimatch.js CHANGED
@@ -167,11 +167,6 @@ class Minimatch {
167
167
 
168
168
  if (!options) options = {}
169
169
 
170
- // windows support: need to use /, not \
171
- if (!options.allowWindowsEscape && path.sep !== '/') {
172
- pattern = pattern.split(path.sep).join('/')
173
- }
174
-
175
170
  this.options = options
176
171
  this.set = []
177
172
  this.pattern = pattern
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
3
3
  "name": "minimatch",
4
4
  "description": "a glob matcher in javascript",
5
- "version": "4.2.1",
5
+ "version": "5.0.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git://github.com/isaacs/minimatch.git"
@@ -19,7 +19,7 @@
19
19
  "node": ">=10"
20
20
  },
21
21
  "dependencies": {
22
- "brace-expansion": "^1.1.7"
22
+ "brace-expansion": "^2.0.1"
23
23
  },
24
24
  "devDependencies": {
25
25
  "tap": "^15.1.6"