tsconfck
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -74,9 +74,17 @@ var __defProp = Object.defineProperty; | ||
if (!visited.has(dir)) { | ||
const dirents = await fs2.readdir(dir, { withFileTypes: true }); | ||
for (const dirent of dirents) { | ||
if (dirent.isDirectory() && (!(options == null ? void 0 : options.skip) || !options.skip(dirent.name))) { | ||
yield* findTSConfig(path2.resolve(dir, dirent.name), options, visited); | ||
} else if (dirent.isFile() && dirent.name === "tsconfig.json") { | ||
yield path2.resolve(dir, dirent.name); | ||
visited.add(dir); | ||
try { | ||
const dirents = await fs2.readdir(dir, { withFileTypes: true }); | ||
for (const dirent of dirents) { | ||
if (dirent.isDirectory() && (!(options == null ? void 0 : options.skip) || !options.skip(dirent.name))) { | ||
yield* findTSConfig(path2.resolve(dir, dirent.name), options, visited); | ||
} else if (dirent.isFile() && dirent.name === "tsconfig.json") { | ||
yield path2.resolve(dir, dirent.name); | ||
} | ||
} | ||
} catch (e) { | ||
if (e.code === "EACCES" || e.code === "ENOENT") { | ||
return; | ||
} | ||
throw e; | ||
} | ||
@@ -83,0 +91,0 @@ } |
{ | ||
"name": "tsconfck", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "A utility to work with tsconfig.json without typescript", | ||
@@ -49,8 +49,8 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@commitlint/cli": "^16.2.1", | ||
"@commitlint/cli": "^16.2.3", | ||
"@commitlint/config-conventional": "^16.2.1", | ||
"@tsconfig/node12": "^1.0.9", | ||
"@types/node": "^17.0.21", | ||
"@typescript-eslint/eslint-plugin": "^5.15.0", | ||
"@typescript-eslint/parser": "^5.15.0", | ||
"@typescript-eslint/eslint-plugin": "^5.17.0", | ||
"@typescript-eslint/parser": "^5.17.0", | ||
"c8": "^7.11.0", | ||
@@ -60,4 +60,4 @@ "chalk": "^5.0.1", | ||
"enquirer": "^2.3.6", | ||
"esbuild": "^0.14.26", | ||
"eslint": "^8.11.0", | ||
"esbuild": "^0.14.31", | ||
"eslint": "^8.12.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
@@ -69,6 +69,6 @@ "eslint-plugin-markdown": "^2.2.1", | ||
"husky": "^7.0.4", | ||
"lint-staged": "^12.3.5", | ||
"lint-staged": "^12.3.7", | ||
"minimist": "^1.2.6", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.5.1", | ||
"prettier": "^2.6.2", | ||
"rimraf": "^3.0.2", | ||
@@ -78,4 +78,4 @@ "semver": "^7.3.5", | ||
"tsm": "^2.2.1", | ||
"tsup": "^5.12.1", | ||
"typescript": "^4.6.2", | ||
"tsup": "^5.12.4", | ||
"typescript": "^4.6.3", | ||
"uvu": "^0.5.3", | ||
@@ -82,0 +82,0 @@ "watchlist": "^0.3.1" |
@@ -25,9 +25,17 @@ import path from 'path'; | ||
if (!visited.has(dir)) { | ||
const dirents = await fs.readdir(dir, { withFileTypes: true }); | ||
for (const dirent of dirents) { | ||
if (dirent.isDirectory() && (!options?.skip || !options.skip(dirent.name))) { | ||
yield* findTSConfig(path.resolve(dir, dirent.name), options, visited); | ||
} else if (dirent.isFile() && dirent.name === 'tsconfig.json') { | ||
yield path.resolve(dir, dirent.name); | ||
visited.add(dir); | ||
try { | ||
const dirents = await fs.readdir(dir, { withFileTypes: true }); | ||
for (const dirent of dirents) { | ||
if (dirent.isDirectory() && (!options?.skip || !options.skip(dirent.name))) { | ||
yield* findTSConfig(path.resolve(dir, dirent.name), options, visited); | ||
} else if (dirent.isFile() && dirent.name === 'tsconfig.json') { | ||
yield path.resolve(dir, dirent.name); | ||
} | ||
} | ||
} catch (e) { | ||
if (e.code === 'EACCES' || e.code === 'ENOENT') { | ||
return; // directory inaccessible or deleted | ||
} | ||
throw e; | ||
} | ||
@@ -34,0 +42,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
215193
2814