@typescript-eslint/typescript-estree
Advanced tools
Comparing version 8.1.1-alpha.4 to 8.1.1-alpha.5
@@ -30,4 +30,4 @@ "use strict"; | ||
exports.createProjectProgram = createProjectProgram; | ||
const node_path_1 = __importDefault(require("node:path")); | ||
const debug_1 = __importDefault(require("debug")); | ||
const path_1 = __importDefault(require("path")); | ||
const ts = __importStar(require("typescript")); | ||
@@ -78,3 +78,3 @@ const node_utils_1 = require("../node-utils"); | ||
}); | ||
const fileExtension = path_1.default.extname(parseSettings.filePath); | ||
const fileExtension = node_path_1.default.extname(parseSettings.filePath); | ||
if (!DEFAULT_EXTRA_FILE_EXTENSIONS.includes(fileExtension)) { | ||
@@ -81,0 +81,0 @@ const nonStandardExt = `The extension for the file (\`${fileExtension}\`) is non-standard`; |
@@ -7,8 +7,8 @@ "use strict"; | ||
exports.describeFilePath = describeFilePath; | ||
const path_1 = __importDefault(require("path")); | ||
const node_path_1 = __importDefault(require("node:path")); | ||
function describeFilePath(filePath, tsconfigRootDir) { | ||
// If the TSConfig root dir is a parent of the filePath, use | ||
// `<tsconfigRootDir>` as a prefix for the path. | ||
const relative = path_1.default.relative(tsconfigRootDir, filePath); | ||
if (relative && !relative.startsWith('..') && !path_1.default.isAbsolute(relative)) { | ||
const relative = node_path_1.default.relative(tsconfigRootDir, filePath); | ||
if (relative && !relative.startsWith('..') && !node_path_1.default.isAbsolute(relative)) { | ||
return `<tsconfigRootDir>/${relative}`; | ||
@@ -15,0 +15,0 @@ } |
@@ -27,4 +27,4 @@ "use strict"; | ||
exports.getParsedConfigFile = getParsedConfigFile; | ||
const fs = __importStar(require("fs")); | ||
const path = __importStar(require("path")); | ||
const fs = __importStar(require("node:fs")); | ||
const path = __importStar(require("node:path")); | ||
const shared_1 = require("./shared"); | ||
@@ -31,0 +31,0 @@ /** |
@@ -31,6 +31,6 @@ "use strict"; | ||
exports.getLanguageVariant = getLanguageVariant; | ||
const path_1 = __importDefault(require("path")); | ||
const node_path_1 = __importDefault(require("node:path")); | ||
const ts = __importStar(require("typescript")); | ||
function getScriptKind(filePath, jsx) { | ||
const extension = path_1.default.extname(filePath).toLowerCase(); | ||
const extension = node_path_1.default.extname(filePath).toLowerCase(); | ||
// note - we only respect the user's jsx setting for unknown extensions | ||
@@ -37,0 +37,0 @@ // this is so that we always match TS's internal script kind logic, preventing |
@@ -31,4 +31,4 @@ "use strict"; | ||
exports.getWatchProgramsForProjects = getWatchProgramsForProjects; | ||
const node_fs_1 = __importDefault(require("node:fs")); | ||
const debug_1 = __importDefault(require("debug")); | ||
const fs_1 = __importDefault(require("fs")); | ||
const ts = __importStar(require("typescript")); | ||
@@ -262,3 +262,3 @@ const source_files_1 = require("../source-files"); | ||
function hasTSConfigChanged(tsconfigPath) { | ||
const stat = fs_1.default.statSync(tsconfigPath); | ||
const stat = node_fs_1.default.statSync(tsconfigPath); | ||
const lastModifiedAt = stat.mtimeMs; | ||
@@ -350,3 +350,3 @@ const cachedLastModifiedAt = tsconfigLastModifiedTimestampCache.get(tsconfigPath); | ||
// use find because we only need to "delete" one file to cause typescript to do a full resync | ||
const deletedFile = rootFilenames.find(file => !fs_1.default.existsSync(file)); | ||
const deletedFile = rootFilenames.find(file => !node_fs_1.default.existsSync(file)); | ||
if (!deletedFile) { | ||
@@ -353,0 +353,0 @@ // There are no deleted files, so it must be the former case of the file not belonging to this program |
@@ -36,3 +36,3 @@ "use strict"; | ||
exports.getAstFromProgram = getAstFromProgram; | ||
const path_1 = __importDefault(require("path")); | ||
const node_path_1 = __importDefault(require("node:path")); | ||
const ts = __importStar(require("typescript")); | ||
@@ -77,4 +77,4 @@ /** | ||
function getCanonicalFileName(filePath) { | ||
let normalized = path_1.default.normalize(filePath); | ||
if (normalized.endsWith(path_1.default.sep)) { | ||
let normalized = node_path_1.default.normalize(filePath); | ||
if (normalized.endsWith(node_path_1.default.sep)) { | ||
normalized = normalized.slice(0, -1); | ||
@@ -85,8 +85,8 @@ } | ||
function ensureAbsolutePath(p, tsconfigRootDir) { | ||
return path_1.default.isAbsolute(p) | ||
return node_path_1.default.isAbsolute(p) | ||
? p | ||
: path_1.default.join(tsconfigRootDir || process.cwd(), p); | ||
: node_path_1.default.join(tsconfigRootDir || process.cwd(), p); | ||
} | ||
function canonicalDirname(p) { | ||
return path_1.default.dirname(p); | ||
return node_path_1.default.dirname(p); | ||
} | ||
@@ -102,3 +102,3 @@ const DEFINITION_EXTENSIONS = [ | ||
} | ||
return (DEFINITION_EXTENSIONS.find(definitionExt => fileName.endsWith(definitionExt)) ?? path_1.default.extname(fileName)); | ||
return (DEFINITION_EXTENSIONS.find(definitionExt => fileName.endsWith(definitionExt)) ?? node_path_1.default.extname(fileName)); | ||
} | ||
@@ -105,0 +105,0 @@ function getAstFromProgram(currentProgram, filePath) { |
@@ -31,4 +31,4 @@ "use strict"; | ||
exports.createProgramFromConfigFile = createProgramFromConfigFile; | ||
const path = __importStar(require("node:path")); | ||
const debug_1 = __importDefault(require("debug")); | ||
const path = __importStar(require("path")); | ||
const ts = __importStar(require("typescript")); | ||
@@ -35,0 +35,0 @@ const getParsedConfigFile_1 = require("./getParsedConfigFile"); |
@@ -30,5 +30,5 @@ "use strict"; | ||
exports.getProjectConfigFiles = getProjectConfigFiles; | ||
const fs = __importStar(require("node:fs")); | ||
const path = __importStar(require("node:path")); | ||
const debug_1 = __importDefault(require("debug")); | ||
const fs = __importStar(require("fs")); | ||
const path = __importStar(require("path")); | ||
const log = (0, debug_1.default)('typescript-eslint:typescript-estree:getProjectConfigFiles'); | ||
@@ -35,0 +35,0 @@ /** |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.inferSingleRun = inferSingleRun; | ||
const path_1 = __importDefault(require("path")); | ||
const node_path_1 = __importDefault(require("node:path")); | ||
/** | ||
@@ -53,3 +53,3 @@ * ESLint (and therefore typescript-eslint) is used in both "single run"/one-time contexts, | ||
// This will be true for invocations such as `npx eslint ...` and `./node_modules/.bin/eslint ...` | ||
possibleEslintBinPaths.some(binPath => process.argv[1].endsWith(path_1.default.normalize(binPath)))) { | ||
possibleEslintBinPaths.some(binPath => process.argv[1].endsWith(node_path_1.default.normalize(binPath)))) { | ||
return !process.argv.includes('--fix'); | ||
@@ -56,0 +56,0 @@ } |
{ | ||
"name": "@typescript-eslint/typescript-estree", | ||
"version": "8.1.1-alpha.4", | ||
"version": "8.1.1-alpha.5", | ||
"description": "A parser that converts TypeScript source code into an ESTree compatible form", | ||
@@ -57,4 +57,4 @@ "files": [ | ||
"dependencies": { | ||
"@typescript-eslint/types": "8.1.1-alpha.4", | ||
"@typescript-eslint/visitor-keys": "8.1.1-alpha.4", | ||
"@typescript-eslint/types": "8.1.1-alpha.5", | ||
"@typescript-eslint/visitor-keys": "8.1.1-alpha.5", | ||
"debug": "^4.3.4", | ||
@@ -61,0 +61,0 @@ "globby": "^11.1.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
582138
6
+ Added@typescript-eslint/types@8.1.1-alpha.5(transitive)
+ Added@typescript-eslint/visitor-keys@8.1.1-alpha.5(transitive)
- Removed@typescript-eslint/types@8.1.1-alpha.4(transitive)
- Removed@typescript-eslint/visitor-keys@8.1.1-alpha.4(transitive)