Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jan 19, 2024
1 parent 8de69e2 commit cca5763
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions scripts/tasks/sandbox-parts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,23 @@ import {
addWorkaroundResolutions,
} from '../utils/yarn';
import { exec } from '../utils/exec';
import type { ConfigFile } from '../../code/lib/csf-tools';
import storybookPackages from '../../code/lib/core-common/src/versions';
import { writeConfig } from '../../code/lib/csf-tools';
import type { ConfigFile } from '../../code/lib/csf-tools/src';
import { writeConfig } from '../../code/lib/csf-tools/src';
import { filterExistsInCodeDir } from '../utils/filterExistsInCodeDir';
import { findFirstPath } from '../utils/paths';
import { detectLanguage } from '../../code/lib/cli/src/detect';
import { SupportedLanguage } from '../../code/lib/cli/src/project_types';
import { updatePackageScripts } from '../utils/package-json';
import { addPreviewAnnotations, readMainConfig } from '../utils/main-js';
import { JsPackageManagerFactory } from '../../code/lib/core-common/src/js-package-manager/JsPackageManagerFactory';
import {
type JsPackageManager,
versions as storybookPackages,
JsPackageManagerFactory,
} from '../../code/lib/core-common/src';
import { workspacePath } from '../utils/workspace';
import { babelParse } from '../../code/lib/csf-tools/src/babelParse';
import { CODE_DIRECTORY, REPROS_DIRECTORY } from '../utils/constants';
import type { TemplateKey } from '../../code/lib/cli/src/sandbox-templates';
import type { JsPackageManager } from '../../code/lib/core-common/src/js-package-manager';

const logger = console;

Expand Down Expand Up @@ -378,7 +380,8 @@ export const addStories: Task['run'] = async (
// Ensure that we match the right stories in the stories directory
updateStoriesField(
mainConfig,
(await detectLanguage(packageManager)) === SupportedLanguage.JAVASCRIPT
(await detectLanguage(packageManager as any as Parameters<typeof detectLanguage>[0])) ===
SupportedLanguage.JAVASCRIPT
);

const isCoreRenderer =
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ __metadata:
version: 0.0.0-use.local
resolution: "@storybook/root@workspace:."
languageName: unknown
linkType: soft
linkType: soft

0 comments on commit cca5763

Please sign in to comment.