From 06c8987edb36054bb25e4514277b48b7584084cb Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Tue, 23 May 2023 08:51:06 +0200 Subject: [PATCH] Pass packageManager instead of packageJSON to detectLanguage --- scripts/tasks/sandbox-parts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/tasks/sandbox-parts.ts b/scripts/tasks/sandbox-parts.ts index f139d09a8532..37f62ef4fb9c 100644 --- a/scripts/tasks/sandbox-parts.ts +++ b/scripts/tasks/sandbox-parts.ts @@ -371,12 +371,12 @@ export const addStories: Task['run'] = async ( const storiesPath = await findFirstPath([join('src', 'stories'), 'stories'], { cwd }); const mainConfig = await readMainConfig({ cwd }); + const packageManager = JsPackageManagerFactory.getPackageManager(); // Ensure that we match the right stories in the stories directory - const packageJson = await import(join(cwd, 'package.json')); updateStoriesField( mainConfig, - (await detectLanguage(packageJson)) === SupportedLanguage.JAVASCRIPT + (await detectLanguage(packageManager)) === SupportedLanguage.JAVASCRIPT ); const isCoreRenderer =