Fix dependabot issues
This commit is contained in:
parent
c89d9bd8b0
commit
531c6ba7c8
705 changed files with 53406 additions and 20466 deletions
23
node_modules/is-path-inside/index.js
generated
vendored
23
node_modules/is-path-inside/index.js
generated
vendored
|
|
@ -2,20 +2,11 @@
|
|||
const path = require('path');
|
||||
|
||||
module.exports = (childPath, parentPath) => {
|
||||
childPath = path.resolve(childPath);
|
||||
parentPath = path.resolve(parentPath);
|
||||
|
||||
if (process.platform === 'win32') {
|
||||
childPath = childPath.toLowerCase();
|
||||
parentPath = parentPath.toLowerCase();
|
||||
}
|
||||
|
||||
if (childPath === parentPath) {
|
||||
return false;
|
||||
}
|
||||
|
||||
childPath += path.sep;
|
||||
parentPath += path.sep;
|
||||
|
||||
return childPath.startsWith(parentPath);
|
||||
const relation = path.relative(parentPath, childPath);
|
||||
return Boolean(
|
||||
relation &&
|
||||
relation !== '..' &&
|
||||
!relation.startsWith(`..${path.sep}`) &&
|
||||
relation !== path.resolve(childPath)
|
||||
);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue