Batch fixes before release (#1011)

* fix: improve projectRoot

* fix: improve task-master lang command

* feat: add documentation to the readme so more people can access it

* fix: expand command subtask dependency validation

* fix: update command more reliable with perplexity and other models

* chore: fix CI

* chore: implement requested changes

* chore: fix CI
This commit is contained in:
Ralph Khreish
2025-07-19 00:57:47 +03:00
parent 858d4a1c54
commit 444aa5ae19
17 changed files with 148 additions and 83 deletions

View File

@@ -66,8 +66,10 @@ export function findProjectRoot(startDir = process.cwd()) {
let currentDir = path.resolve(startDir);
const rootDir = path.parse(currentDir).root;
const maxDepth = 50; // Reasonable limit to prevent infinite loops
let depth = 0;
while (currentDir !== rootDir) {
while (currentDir !== rootDir && depth < maxDepth) {
// Check if current directory contains any project markers
for (const marker of projectMarkers) {
const markerPath = path.join(currentDir, marker);
@@ -76,9 +78,11 @@ export function findProjectRoot(startDir = process.cwd()) {
}
}
currentDir = path.dirname(currentDir);
depth++;
}
return null;
// Fallback to current working directory if no project root found
return process.cwd();
}
/**