minimatch 5.1.3 → 5.1.4
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/LICENSE +1 -1
- package/minimatch.js +6 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The ISC License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2011-
|
|
3
|
+
Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
|
|
4
4
|
|
|
5
5
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
6
|
purpose with or without fee is hereby granted, provided that the above
|
package/minimatch.js
CHANGED
|
@@ -427,7 +427,7 @@ class Minimatch {
|
|
|
427
427
|
if (pattern === '') return ''
|
|
428
428
|
|
|
429
429
|
let re = ''
|
|
430
|
-
let hasMagic =
|
|
430
|
+
let hasMagic = false
|
|
431
431
|
let escaping = false
|
|
432
432
|
// ? => one single character
|
|
433
433
|
const patternListStack = []
|
|
@@ -750,6 +750,11 @@ class Minimatch {
|
|
|
750
750
|
return [re, hasMagic]
|
|
751
751
|
}
|
|
752
752
|
|
|
753
|
+
// if it's nocase, and the lcase/uppercase don't match, it's magic
|
|
754
|
+
if (options.nocase && !hasMagic) {
|
|
755
|
+
hasMagic = pattern.toUpperCase() !== pattern.toLowerCase()
|
|
756
|
+
}
|
|
757
|
+
|
|
753
758
|
// skip the regexp for non-magical patterns
|
|
754
759
|
// unescape anything in it, though, so that it'll be
|
|
755
760
|
// an exact match against a file etc.
|
package/package.json
CHANGED