Update outdated Node package.
This commit is contained in:
parent
11d56696ec
commit
d6fc379360
3 changed files with 32 additions and 3 deletions
7
node_modules/glob-parent/CHANGELOG.md
generated
vendored
7
node_modules/glob-parent/CHANGELOG.md
generated
vendored
|
|
@ -4,6 +4,13 @@
|
||||||
|
|
||||||
- eliminate ReDoS ([#36](https://github.com/gulpjs/glob-parent/issues/36)) ([f923116](https://github.com/gulpjs/glob-parent/commit/f9231168b0041fea3f8f954b3cceb56269fc6366))
|
- eliminate ReDoS ([#36](https://github.com/gulpjs/glob-parent/issues/36)) ([f923116](https://github.com/gulpjs/glob-parent/commit/f9231168b0041fea3f8f954b3cceb56269fc6366))
|
||||||
|
|
||||||
|
### [6.0.1](https://www.github.com/gulpjs/glob-parent/compare/v6.0.0...v6.0.1) (2021-07-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Resolve ReDoS vulnerability from CVE-2021-35065 ([#49](https://www.github.com/gulpjs/glob-parent/issues/49)) ([3e9f04a](https://www.github.com/gulpjs/glob-parent/commit/3e9f04a3b4349db7e1962d87c9a7398cda51f339))
|
||||||
|
|
||||||
## [6.0.0](https://www.github.com/gulpjs/glob-parent/compare/v5.1.2...v6.0.0) (2021-05-03)
|
## [6.0.0](https://www.github.com/gulpjs/glob-parent/compare/v5.1.2...v6.0.0) (2021-05-03)
|
||||||
|
|
||||||
### ⚠ BREAKING CHANGES
|
### ⚠ BREAKING CHANGES
|
||||||
|
|
|
||||||
26
node_modules/glob-parent/index.js
generated
vendored
26
node_modules/glob-parent/index.js
generated
vendored
|
|
@ -6,7 +6,6 @@ var isWin32 = require('os').platform() === 'win32';
|
||||||
|
|
||||||
var slash = '/';
|
var slash = '/';
|
||||||
var backslash = /\\/g;
|
var backslash = /\\/g;
|
||||||
var enclosure = /[{[].*\/.*[}\]]$/;
|
|
||||||
var globby = /(^|[^\\])([{[]|\([^)]+$)/;
|
var globby = /(^|[^\\])([{[]|\([^)]+$)/;
|
||||||
var escaped = /\\([!*?|[\](){}])/g;
|
var escaped = /\\([!*?|[\](){}])/g;
|
||||||
|
|
||||||
|
|
@ -24,7 +23,7 @@ module.exports = function globParent(str, opts) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// special case for strings ending in enclosure containing path separator
|
// special case for strings ending in enclosure containing path separator
|
||||||
if (enclosure.test(str)) {
|
if (isEnclosure(str)) {
|
||||||
str += slash;
|
str += slash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -39,3 +38,26 @@ module.exports = function globParent(str, opts) {
|
||||||
// remove escape chars and return result
|
// remove escape chars and return result
|
||||||
return str.replace(escaped, '$1');
|
return str.replace(escaped, '$1');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function isEnclosure(str) {
|
||||||
|
var lastChar = str.slice(-1);
|
||||||
|
|
||||||
|
var enclosureStart;
|
||||||
|
switch (lastChar) {
|
||||||
|
case '}':
|
||||||
|
enclosureStart = '{';
|
||||||
|
break;
|
||||||
|
case ']':
|
||||||
|
enclosureStart = '[';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var foundIndex = str.indexOf(enclosureStart);
|
||||||
|
if (foundIndex < 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return str.slice(foundIndex + 1, -1).includes(slash);
|
||||||
|
}
|
||||||
|
|
|
||||||
2
node_modules/glob-parent/package.json
generated
vendored
2
node_modules/glob-parent/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "glob-parent",
|
"name": "glob-parent",
|
||||||
"version": "6.0.0",
|
"version": "6.0.1",
|
||||||
"description": "Extract the non-magic parent path from a glob string.",
|
"description": "Extract the non-magic parent path from a glob string.",
|
||||||
"author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)",
|
"author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue