minimatch 3.0.6 → 3.1.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 +6 -0
- package/minimatch.js +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -187,6 +187,12 @@ minimatch('/a/b', '/**/d', { partial: true }) // true, might be /a/b/.../d
|
|
|
187
187
|
minimatch('/x/y/z', '/a/**/z', { partial: true }) // false, because x !== a
|
|
188
188
|
```
|
|
189
189
|
|
|
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
|
+
|
|
190
196
|
## Comparisons to other fnmatch/glob implementations
|
|
191
197
|
|
|
192
198
|
While strict compliance with the existing standards is a worthwhile
|
package/minimatch.js
CHANGED
|
@@ -135,7 +135,7 @@ function Minimatch (pattern, options) {
|
|
|
135
135
|
if (!options) options = {}
|
|
136
136
|
|
|
137
137
|
// windows support: need to use /, not \
|
|
138
|
-
if (path.sep !== '/') {
|
|
138
|
+
if (!options.allowWindowsEscape && path.sep !== '/') {
|
|
139
139
|
pattern = pattern.split(path.sep).join('/')
|
|
140
140
|
}
|
|
141
141
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
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": "3.0
|
|
5
|
+
"version": "3.1.0",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"tag": "v3-legacy"
|
|
8
|
+
},
|
|
6
9
|
"repository": {
|
|
7
10
|
"type": "git",
|
|
8
11
|
"url": "git://github.com/isaacs/minimatch.git"
|