minimatch 4.0.0 → 4.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 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
@@ -167,7 +167,7 @@ class Minimatch {
167
167
  if (!options) options = {}
168
168
 
169
169
  // windows support: need to use /, not \
170
- if (path.sep !== '/') {
170
+ if (!options.allowWindowsEscape && path.sep !== '/') {
171
171
  pattern = pattern.split(path.sep).join('/')
172
172
  }
173
173
 
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.0.0",
5
+ "version": "4.1.0",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git://github.com/isaacs/minimatch.git"
@@ -12,7 +12,7 @@
12
12
  "test": "tap",
13
13
  "preversion": "npm test",
14
14
  "postversion": "npm publish",
15
- "postpublish": "git push origin --all; git push origin --tags"
15
+ "prepublishOnly": "git push origin --follow-tags"
16
16
  },
17
17
  "engines": {
18
18
  "node": ">=10"