Bump eslint-plugin-import to avoid vulnerability in dependency
This commit is contained in:
parent
10695e6a20
commit
ed9506bbaf
1660 changed files with 67726 additions and 27926 deletions
15
node_modules/tsconfig-paths/lib/try-path.js
generated
vendored
15
node_modules/tsconfig-paths/lib/try-path.js
generated
vendored
|
|
@ -1,5 +1,6 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.exhaustiveTypeException = exports.getStrippedPath = exports.getPathsToTry = void 0;
|
||||
var path = require("path");
|
||||
var path_1 = require("path");
|
||||
var filesystem_1 = require("./filesystem");
|
||||
|
|
@ -11,10 +12,7 @@ var filesystem_1 = require("./filesystem");
|
|||
* 4. Check for files named as request ending in "index" with any of the extensions.
|
||||
*/
|
||||
function getPathsToTry(extensions, absolutePathMappings, requestedModule) {
|
||||
if (!absolutePathMappings ||
|
||||
!requestedModule ||
|
||||
requestedModule[0] === "." ||
|
||||
requestedModule[0] === path.sep) {
|
||||
if (!absolutePathMappings || !requestedModule || requestedModule[0] === ".") {
|
||||
return undefined;
|
||||
}
|
||||
var pathsToTry = [];
|
||||
|
|
@ -30,7 +28,7 @@ function getPathsToTry(extensions, absolutePathMappings, requestedModule) {
|
|||
pathsToTry.push.apply(pathsToTry, extensions.map(function (e) { return ({ type: "extension", path: physicalPath + e }); }));
|
||||
pathsToTry.push({
|
||||
type: "package",
|
||||
path: path.join(physicalPath, "/package.json")
|
||||
path: path.join(physicalPath, "/package.json"),
|
||||
});
|
||||
var indexPath = path.join(physicalPath, "/index");
|
||||
pathsToTry.push.apply(pathsToTry, extensions.map(function (e) { return ({ type: "index", path: indexPath + e }); }));
|
||||
|
|
@ -47,18 +45,18 @@ exports.getPathsToTry = getPathsToTry;
|
|||
// Not sure why we don't just return the full found path?
|
||||
function getStrippedPath(tryPath) {
|
||||
return tryPath.type === "index"
|
||||
? path_1.dirname(tryPath.path)
|
||||
? (0, path_1.dirname)(tryPath.path)
|
||||
: tryPath.type === "file"
|
||||
? tryPath.path
|
||||
: tryPath.type === "extension"
|
||||
? filesystem_1.removeExtension(tryPath.path)
|
||||
? (0, filesystem_1.removeExtension)(tryPath.path)
|
||||
: tryPath.type === "package"
|
||||
? tryPath.path
|
||||
: exhaustiveTypeException(tryPath.type);
|
||||
}
|
||||
exports.getStrippedPath = getStrippedPath;
|
||||
function exhaustiveTypeException(check) {
|
||||
throw new Error("Unknown type " + check);
|
||||
throw new Error("Unknown type ".concat(check));
|
||||
}
|
||||
exports.exhaustiveTypeException = exhaustiveTypeException;
|
||||
/**
|
||||
|
|
@ -89,3 +87,4 @@ function matchStar(pattern, search) {
|
|||
}
|
||||
return search.substr(star, search.length - part2.length);
|
||||
}
|
||||
//# sourceMappingURL=try-path.js.map
|
||||
Loading…
Add table
Add a link
Reference in a new issue