From e69428c5f848095528767d92d97ed74c6812b439 Mon Sep 17 00:00:00 2001 From: Harrison Hogg Date: Mon, 23 Sep 2024 09:46:39 +0100 Subject: [PATCH] Use the paths to find workspace files Signed-off-by: Harrison Hogg --- packages/cli/src/lib/typeDistProject.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/lib/typeDistProject.ts b/packages/cli/src/lib/typeDistProject.ts index cd5eb9cd74..8721f3fa24 100644 --- a/packages/cli/src/lib/typeDistProject.ts +++ b/packages/cli/src/lib/typeDistProject.ts @@ -13,16 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { findPaths } from '@backstage/cli-common'; import { PackageRole } from '@backstage/cli-node'; import { resolve as resolvePath } from 'path'; import { Project, SourceFile, SyntaxKind, ts, Type } from 'ts-morph'; +import { paths } from './paths'; export const createTypeDistProject = async () => { - const workspaceRoot = findPaths(process.cwd()).targetRoot; - return new Project({ - tsConfigFilePath: resolvePath(workspaceRoot, 'tsconfig.json'), + tsConfigFilePath: paths.resolveTargetRoot('tsconfig.json'), skipAddingFilesFromTsConfig: true, }); };