picomatch
2.3.12.3.2
lib/constants.js~
lib/constants.jsModified+5
Index: package/lib/constants.js
===================================================================
--- package/lib/constants.js
+++ package/lib/constants.js
@@ -3,8 +3,10 @@
const path = require('path');
const WIN_SLASH = '\\\\/';
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
+const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
+
/**
* Posix glob regex
*/
@@ -66,8 +68,9 @@
* POSIX Bracket Regex
*/
const POSIX_REGEX_SOURCE = {
+ __proto__: null,
alnum: 'a-zA-Z0-9',
alpha: 'a-zA-Z',
ascii: '\\x00-\\x7F',
blank: ' \\t',
@@ -83,8 +86,9 @@
xdigit: 'A-Fa-f0-9'
};
module.exports = {
+ DEFAULT_MAX_EXTGLOB_RECURSION,
MAX_LENGTH: 1024 * 64,
POSIX_REGEX_SOURCE,
// regular expressions
@@ -96,8 +100,9 @@
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
// Replace globs with equivalent patterns to reduce parsing time.
REPLACEMENTS: {
+ __proto__: null,
'***': '*',
'**/**': '**',
'**/**/**': '**'
},