Skip to content

Commit

Permalink
Pass packageManager instead of packageJSON to detectLanguage
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed May 30, 2023
1 parent 16cd3c5 commit f01a652
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/tasks/sandbox-parts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit f01a652

Please sign in to comment.