From 58a61b4478df206c8eaed319cffbbfb39a092bf6 Mon Sep 17 00:00:00 2001 From: SoonIter Date: Tue, 13 Aug 2024 16:30:27 +0800 Subject: [PATCH] chore: remove unnecessary changes --- e2e/scripts/shared.ts | 3 --- packages/core/src/utils/helper.ts | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/e2e/scripts/shared.ts b/e2e/scripts/shared.ts index 40ca88dc7..fa328c6c3 100644 --- a/e2e/scripts/shared.ts +++ b/e2e/scripts/shared.ts @@ -73,9 +73,6 @@ export async function getResults( } if (!globFolder) continue; - if (!isAbsolute(globFolder)) { - globFolder = join(fixturePath, globFolder); - } const regex = type === 'dts' ? /\.d.(ts|cts|mts)$/ : /\.(js|cjs|mjs)$/; diff --git a/packages/core/src/utils/helper.ts b/packages/core/src/utils/helper.ts index 956d66afd..b4d433527 100644 --- a/packages/core/src/utils/helper.ts +++ b/packages/core/src/utils/helper.ts @@ -108,7 +108,7 @@ async function calcLongestCommonPath( } export const readPackageJson = (rootPath: string): undefined | PkgJson => { - const pkgJsonPath = path.join(rootPath, './package.json'); + const pkgJsonPath = path.resolve(rootPath, './package.json'); if (!fs.existsSync(pkgJsonPath)) { logger.warn(`package.json does not exist in the ${rootPath} directory`);