jsdoczoom 0.4.12 → 0.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/drilldown.js +9 -6
- package/package.json +1 -1
package/dist/drilldown.js
CHANGED
|
@@ -389,12 +389,15 @@ export async function drilldownFiles(
|
|
|
389
389
|
) {
|
|
390
390
|
const d = depth ?? 1;
|
|
391
391
|
const ig = loadGitignore(cwd);
|
|
392
|
-
const tsFiles = filePaths.filter(
|
|
393
|
-
(f)
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
392
|
+
const tsFiles = filePaths.filter((f) => {
|
|
393
|
+
if (!(f.endsWith(".ts") || f.endsWith(".tsx")) || f.endsWith(".d.ts")) {
|
|
394
|
+
return false;
|
|
395
|
+
}
|
|
396
|
+
const rel = relative(cwd, f);
|
|
397
|
+
// Files outside cwd (traversal paths) are beyond the gitignore scope
|
|
398
|
+
if (rel.startsWith("..")) return true;
|
|
399
|
+
return !ig.ignores(rel);
|
|
400
|
+
});
|
|
398
401
|
const results = await collectSafeResults(tsFiles, d, cwd, config);
|
|
399
402
|
const sorted = results.sort((a, b) => sortKey(a).localeCompare(sortKey(b)));
|
|
400
403
|
const total = sorted.length;
|