Update repository root path resolution to use process.cwd()

This commit is contained in:
2026-04-27 15:51:24 +02:00
parent d71d0d1b84
commit 112e217efe

View File

@@ -1,5 +1,4 @@
import path from "node:path"; import path from "node:path";
import { fileURLToPath } from "node:url";
import ts from "typescript"; import ts from "typescript";
interface AuthorableRoot { interface AuthorableRoot {
@@ -134,10 +133,7 @@ const DISCRIMINATOR_CANDIDATES = [
"kind" "kind"
] as const; ] as const;
const repoRoot = path.resolve( const repoRoot = process.cwd();
path.dirname(fileURLToPath(import.meta.url)),
".."
);
const configPath = ts.findConfigFile(repoRoot, ts.sys.fileExists, "tsconfig.json"); const configPath = ts.findConfigFile(repoRoot, ts.sys.fileExists, "tsconfig.json");
if (configPath === undefined) { if (configPath === undefined) {