You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: add option for maximum nested extglobs with default depth of 2
Also find other risky globs and treat them as literals
* Update test/options.maxExtglobRecursion.js
Co-authored-by: Brian Woodward <brian.woodward@gmail.com>
* Fix bug for single character nested star-only extglobs
* Move constant to constants.js and set to 0 by default
---------
Co-authored-by: Brian Woodward <brian.woodward@gmail.com>
# Conflicts:
# .verb.md
# README.md
Copy file name to clipboardExpand all lines: .verb.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -108,7 +108,8 @@ The following options may be used with the main `picomatch()` function or any of
108
108
|`literalBrackets`|`boolean`|`undefined`| When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
109
109
|`lookbehinds`|`boolean`|`true`| Support regex positive and negative lookbehinds. Note that you must be using Node 8.1.10 or higher to enable regex lookbehinds. |
110
110
|`matchBase`|`boolean`|`false`| Alias for `basename`|
111
-
|`maxLength`|`boolean`|`65536`| Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
111
+
|`maxLength`|`number`|`65536`| Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
112
+
|`maxExtglobRecursion`|`number\|boolean`|`0`| Limit nested quantified extglobs and other risky repeated extglob forms. When the limit is exceeded, the extglob is treated as a literal string instead of being compiled to regex. Set to `false` to disable this safeguard. |
112
113
|`nobrace`|`boolean`|`false`| Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
113
114
|`nobracket`|`boolean`|`undefined`| Disable matching with regex brackets. |
114
115
|`nocase`|`boolean`|`false`| Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
Copy file name to clipboardExpand all lines: README.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -318,7 +318,8 @@ The following options may be used with the main `picomatch()` function or any of
318
318
| `keepQuotes` | `boolean` | `false` | Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes. |
319
319
| `literalBrackets` | `boolean` | `undefined` | When `true`, brackets in the glob pattern will be escaped so that only literal brackets will be matched. |
320
320
| `matchBase` | `boolean` | `false` | Alias for `basename` |
321
-
| `maxLength` | `boolean` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
321
+
| `maxLength` | `number` | `65536` | Limit the max length of the input string. An error is thrown if the input string is longer than this value. |
322
+
| `maxExtglobRecursion` | `number\|boolean` | `0` | Limit nested quantified extglobs and other risky repeated extglob forms. When the limit is exceeded, the extglob is treated as a literal string instead of being compiled to regex. Set to `false` to disable this safeguard. |
322
323
| `nobrace` | `boolean` | `false` | Disable brace matching, so that `{a,b}` and `{1..3}` would be treated as literal characters. |
| `nocase` | `boolean` | `false` | Make matching case-insensitive. Equivalent to the regex `i` flag. Note that this option is overridden by the `flags` option. |
0 commit comments