Bump eslint-plugin-import to avoid vulnerability in dependency

This commit is contained in:
Henry Mercer 2023-01-18 20:26:59 +00:00
parent 10695e6a20
commit ed9506bbaf
1660 changed files with 67726 additions and 27926 deletions

View file

@ -1,5 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.matchFromAbsolutePaths = exports.createMatchPath = void 0;
var path = require("path");
var Filesystem = require("./filesystem");
var MappingEntry = require("./mapping-entry");
@ -26,7 +27,7 @@ exports.createMatchPath = createMatchPath;
* @param absolutePathMappings The paths to try as specified in tsconfig but resolved to absolute form.
* @param requestedModule The required module name.
* @param readJson Function that can read json from a path (useful for testing).
* @param fileExists Function that checks for existance of a file at a path (useful for testing).
* @param fileExists Function that checks for existence of a file at a path (useful for testing).
* @param extensions File extensions to probe for (useful for testing).
* @param mainFields A list of package.json field names to try when resolving module files.
* @returns the found path, or undefined if no path was found.
@ -65,7 +66,6 @@ function findFirstExistingPath(tryPaths, readJson, fileExists, mainFields) {
tryPath.type === "extension" ||
tryPath.type === "index") {
if (fileExists(tryPath.path)) {
// Not sure why we don't just return the full path? Why strip it?
return TryPath.getStrippedPath(tryPath);
}
}
@ -74,8 +74,7 @@ function findFirstExistingPath(tryPaths, readJson, fileExists, mainFields) {
if (packageJson) {
var mainFieldMappedFile = findFirstExistingMainFieldMappedFile(packageJson, mainFields, tryPath.path, fileExists);
if (mainFieldMappedFile) {
// Not sure why we don't just return the full path? Why strip it?
return Filesystem.removeExtension(mainFieldMappedFile);
return mainFieldMappedFile;
}
}
}
@ -85,3 +84,4 @@ function findFirstExistingPath(tryPaths, readJson, fileExists, mainFields) {
}
return undefined;
}
//# sourceMappingURL=match-path-sync.js.map