Update repository root path resolution to use process.cwd()
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user