repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/addon-mdx-gfm-remove.ts
code/lib/cli-storybook/src/automigrate/fixes/addon-mdx-gfm-remove.ts
import { getAddonNames, removeAddon } from 'storybook/internal/common'; import type { Fix } from '../types'; type AddonMdxGfmOptions = true; /** * Migration to handle @storybook/addon-mdx-gfm being removed * * - Remove @storybook/addon-mdx-gfm from main.ts and package.json */ export const addonMdxGfmRemove: Fix<...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/rnstorybook-config.test.ts
code/lib/cli-storybook/src/automigrate/fixes/rnstorybook-config.test.ts
import { existsSync } from 'node:fs'; import { readFile, rename, writeFile } from 'node:fs/promises'; import { beforeEach, describe, expect, it, vi } from 'vitest'; import type { StorybookConfigRaw } from 'storybook/internal/types'; // eslint-disable-next-line depend/ban-dependencies import { globby } from 'globby';...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/addon-a11y-parameters.ts
code/lib/cli-storybook/src/automigrate/fixes/addon-a11y-parameters.ts
import { readFile } from 'node:fs/promises'; import { writeConfig, writeCsf } from 'storybook/internal/csf-tools'; import { logger } from 'storybook/internal/node-logger'; import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import { transformPreviewA11yParameters, transformStoryA11yParameter...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/wrap-getAbsolutePath.ts
code/lib/cli-storybook/src/automigrate/fixes/wrap-getAbsolutePath.ts
import { detectPnp } from 'storybook/internal/cli'; import { getAbsolutePathWrapperAsCallExpression, getAbsolutePathWrapperName, getFieldsForGetAbsolutePathWrapper, isGetAbsolutePathWrapperNecessary, wrapValueWithGetAbsolutePathWrapper, } from 'storybook/internal/common'; import { readConfig } from 'storybook...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/migrate-addon-console.ts
code/lib/cli-storybook/src/automigrate/fixes/migrate-addon-console.ts
import { readFileSync, writeFileSync } from 'node:fs'; import { types as t } from 'storybook/internal/babel'; import { formatFileContent, getAddonNames, removeAddon } from 'storybook/internal/common'; import { formatConfig, loadConfig } from 'storybook/internal/csf-tools'; import { logger } from 'storybook/internal/no...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/eslint-plugin.ts
code/lib/cli-storybook/src/automigrate/fixes/eslint-plugin.ts
import { SUPPORTED_ESLINT_EXTENSIONS, configureEslintPlugin, extractEslintInfo, } from 'storybook/internal/cli'; import { logger } from 'storybook/internal/node-logger'; import { dedent } from 'ts-dedent'; import type { Fix } from '../types'; interface EslintPluginRunOptions { eslintConfigFile: string; uns...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/addon-storysource-code-panel.ts
code/lib/cli-storybook/src/automigrate/fixes/addon-storysource-code-panel.ts
import { getAddonNames, removeAddon } from 'storybook/internal/common'; import { logger } from 'storybook/internal/node-logger'; import picocolors from 'picocolors'; import { dedent } from 'ts-dedent'; import { add } from '../../add'; import { updateMainConfig } from '../helpers/mainConfigFile'; import type { Fix, Ru...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/remove-essentials.test.ts
code/lib/cli-storybook/src/automigrate/fixes/remove-essentials.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import { JsPackageManager, removeAddon } from 'storybook/internal/common'; import { formatConfig, readConfig } from 'storybook/internal/csf-tools'; import type { StorybookConfigRaw } from 'storybook/internal/types'; import { dedent } from 'ts-dedent'; im...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/initial-globals.ts
code/lib/cli-storybook/src/automigrate/fixes/initial-globals.ts
import { readFile, writeFile } from 'node:fs/promises'; import type { types } from 'storybook/internal/babel'; import type { ConfigFile } from 'storybook/internal/csf-tools'; import { formatConfig, loadConfig } from 'storybook/internal/csf-tools'; import picocolors from 'picocolors'; import type { Fix } from '../typ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/addon-storysource-code-panel.test.ts
code/lib/cli-storybook/src/automigrate/fixes/addon-storysource-code-panel.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import type { JsPackageManager } from 'storybook/internal/common'; import type { StorybookConfigRaw } from 'storybook/internal/types'; import { dedent } from 'ts-dedent'; import { add } from '../../add'; import type { CheckOptions, RunOptions } from '../...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/addon-a11y-addon-test.ts
code/lib/cli-storybook/src/automigrate/fixes/addon-a11y-addon-test.ts
import { formatFileContent, frameworkPackages, getAddonNames } from 'storybook/internal/common'; import { formatConfig, loadConfig } from 'storybook/internal/csf-tools'; import { existsSync, readFileSync, writeFileSync } from 'fs'; import jscodeshift from 'jscodeshift'; import path from 'path'; import picocolors from ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/initial-globals.test.ts
code/lib/cli-storybook/src/automigrate/fixes/initial-globals.test.ts
import * as fsp from 'node:fs/promises'; import { join } from 'node:path'; import { expect, it, vi } from 'vitest'; import { initialGlobals } from './initial-globals'; vi.mock('node:fs/promises', async () => import('../../../../../__mocks__/fs/promises')); const previewConfigPath = join('.storybook', 'preview.js');...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/upgrade-storybook-related-dependencies.ts
code/lib/cli-storybook/src/automigrate/fixes/upgrade-storybook-related-dependencies.ts
import { readFileSync } from 'node:fs'; import { dirname } from 'node:path'; import type { PackageJson } from 'storybook/internal/common'; import type { JsPackageManager } from 'storybook/internal/common'; import { isCorePackage, isSatelliteAddon } from 'storybook/internal/common'; import { logger } from 'storybook/in...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/rnstorybook-config.ts
code/lib/cli-storybook/src/automigrate/fixes/rnstorybook-config.ts
import { existsSync } from 'node:fs'; import { readFile, rename, writeFile } from 'node:fs/promises'; import { join } from 'node:path'; import { dedent } from 'ts-dedent'; import type { Fix } from '../types'; interface Options { storybookDir: string; rnStorybookDir: string; } /** Replaces all occurrences of a s...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/fix-faux-esm-require.ts
code/lib/cli-storybook/src/automigrate/fixes/fix-faux-esm-require.ts
import { readFile, writeFile } from 'node:fs/promises'; import { types as t } from 'storybook/internal/babel'; import { dedent } from 'ts-dedent'; import { type BannerConfig, bannerComment, containsDirnameUsage, containsESMUsage, containsFilenameUsage, containsRequireUsage, hasRequireBanner, updateMa...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/migrate-addon-console.test.ts
code/lib/cli-storybook/src/automigrate/fixes/migrate-addon-console.test.ts
import { readFileSync, writeFileSync } from 'node:fs'; import { beforeEach, describe, expect, it, vi } from 'vitest'; import { getAddonNames, removeAddon } from 'storybook/internal/common'; import { logger } from 'storybook/internal/node-logger'; import { dedent } from 'ts-dedent'; import type { CheckOptions, RunOp...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/remove-docs-autodocs.ts
code/lib/cli-storybook/src/automigrate/fixes/remove-docs-autodocs.ts
import { readConfig } from 'storybook/internal/csf-tools'; import picocolors from 'picocolors'; import { updateMainConfig } from '../helpers/mainConfigFile'; import type { Fix } from '../types'; const logger = { log: (message: string) => { if (process.env.NODE_ENV !== 'test') { console.log(message); ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/remove-addon-interactions.test.ts
code/lib/cli-storybook/src/automigrate/fixes/remove-addon-interactions.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import { getAddonNames } from 'storybook/internal/common'; import { removeAddonInteractions } from './remove-addon-interactions'; vi.mock('storybook/internal/common', async (importOriginal) => { const mod = (await importOriginal()) as any; return { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/wrap-getAbsolutePath-utils.ts
code/lib/cli-storybook/src/automigrate/fixes/wrap-getAbsolutePath-utils.ts
import { types as t } from 'storybook/internal/babel'; import type { ConfigFile } from 'storybook/internal/csf-tools'; const PREFERRED_GET_ABSOLUTE_PATH_WRAPPER_NAME = 'getAbsolutePath'; // TODO: Remove in SB11 const ALTERNATIVE_GET_ABSOLUTE_PATH_WRAPPER_NAME = 'wrapForPnp'; /** * Checks if the following node declar...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/addon-a11y-parameters.test.ts
code/lib/cli-storybook/src/automigrate/fixes/addon-a11y-parameters.test.ts
/* eslint-disable depend/ban-dependencies */ import { afterEach, describe, expect, it, vi } from 'vitest'; import { addonA11yParameters } from './addon-a11y-parameters'; // Mock dependencies vi.mock('node:fs/promises', () => ({ readFile: vi.fn(), })); vi.mock('globby', () => ({ globby: vi.fn(), })); vi.mock('st...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/renderer-to-framework.ts
code/lib/cli-storybook/src/automigrate/fixes/renderer-to-framework.ts
import { readFile, writeFile } from 'node:fs/promises'; import { frameworkPackages, frameworkToRenderer, rendererPackages, } from 'storybook/internal/common'; import { logger } from 'storybook/internal/node-logger'; import type { PackageJson } from 'storybook/internal/types'; import type { Fix, RunOptions } fro...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/addon-experimental-test.test.ts
code/lib/cli-storybook/src/automigrate/fixes/addon-experimental-test.test.ts
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { JsPackageManager } from 'storybook/internal/common'; import type { PackageJson, StorybookConfig } from 'storybook/internal/types'; import { readFileSync, writeFileSync } from 'fs'; import { addonExperimentalTest } from './addon-experi...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/consolidated-imports.test.ts
code/lib/cli-storybook/src/automigrate/fixes/consolidated-imports.test.ts
import { readFile, writeFile } from 'node:fs/promises'; import { describe, expect, it, vi } from 'vitest'; import { JsPackageManager, versions } from 'storybook/internal/common'; import { consolidatedImports, transformPackageJsonFiles } from './consolidated-imports'; // mock picocolors yellow and cyan vi.mock('pico...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/index.ts
code/lib/cli-storybook/src/automigrate/fixes/index.ts
import { csfFactories } from '../../codemod/csf-factories'; import type { CommandFix, Fix } from '../types'; import { addonA11yAddonTest } from './addon-a11y-addon-test'; import { addonA11yParameters } from './addon-a11y-parameters'; import { addonExperimentalTest } from './addon-experimental-test'; import { addonGloba...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/remove-addon-interactions.ts
code/lib/cli-storybook/src/automigrate/fixes/remove-addon-interactions.ts
import { getAddonNames, removeAddon } from 'storybook/internal/common'; import type { Fix } from '../types'; /** Remove @storybook/addon-interactions since it's now part of Storybook core. */ export const removeAddonInteractions: Fix<true> = { id: 'remove-addon-interactions', link: 'https://github.com/storybookjs...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/wrap-getAbsolutePath.test.ts
code/lib/cli-storybook/src/automigrate/fixes/wrap-getAbsolutePath.test.ts
import type { MockInstance } from 'vitest'; import { describe, expect, it, vi } from 'vitest'; import * as detect from 'storybook/internal/cli'; import type { CheckOptions, RunOptions } from '../types'; import { type WrapGetAbsolutePathRunOptions, wrapGetAbsolutePath } from './wrap-getAbsolutePath'; vi.mock('storybo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/consolidated-imports.ts
code/lib/cli-storybook/src/automigrate/fixes/consolidated-imports.ts
import { readFile, writeFile } from 'node:fs/promises'; import { transformImportFiles, versions } from 'storybook/internal/common'; import { consolidatedPackages } from '../helpers/consolidated-packages'; import type { Fix } from '../types'; export interface ConsolidatedOptions { consolidatedDeps: Set<keyof typeof...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/renderer-to-framework.test.ts
code/lib/cli-storybook/src/automigrate/fixes/renderer-to-framework.test.ts
import { readFile, writeFile } from 'node:fs/promises'; import { join } from 'node:path'; import { beforeEach, describe, expect, it, vi } from 'vitest'; import { dedent } from 'ts-dedent'; import { removeRendererInPackageJson, transformSourceFiles } from './renderer-to-framework'; import { rendererToFramework } from...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/cli-storybook/src/automigrate/fixes/addon-globals-api.ts
code/lib/cli-storybook/src/automigrate/fixes/addon-globals-api.ts
import { readFile, writeFile } from 'node:fs/promises'; import { types as t } from 'storybook/internal/babel'; import type { ConfigFile, CsfFile } from 'storybook/internal/csf-tools'; import { formatConfig, loadConfig, loadCsf, writeCsf } from 'storybook/internal/csf-tools'; import type { ArrayExpression, Expression,...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/codemod/vitest.config.ts
code/lib/codemod/vitest.config.ts
import { defineConfig, mergeConfig } from 'vitest/config'; import { vitestCommonConfig } from '../../vitest.shared'; export default mergeConfig( vitestCommonConfig, defineConfig({ // Add custom config here }) );
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/codemod/build-config.ts
code/lib/codemod/build-config.ts
import type { BuildEntries } from '../../../scripts/build/utils/entry-utils'; const config: BuildEntries = { entries: { node: [ { exportEntries: ['.'], entryPoint: './src/index.ts', }, { exportEntries: ['./transforms/csf-2-to-3'], entryPoint: './src/transforms/cs...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/codemod/src/index.ts
code/lib/codemod/src/index.ts
/* eslint import-x/prefer-default-export: "off" */ import { readdirSync } from 'node:fs'; import { rename as renameAsync } from 'node:fs/promises'; import { extname, join } from 'node:path'; import { resolvePackageDir } from 'storybook/internal/common'; import { sync as spawnSync } from 'cross-spawn'; import { glob a...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/codemod/src/transforms/csf-2-to-3.ts
code/lib/codemod/src/transforms/csf-2-to-3.ts
import type { BabelFile, NodePath } from 'storybook/internal/babel'; import { core as babel, types as t } from 'storybook/internal/babel'; import type { CsfFile } from 'storybook/internal/csf-tools'; import { loadCsf, printCsf } from 'storybook/internal/csf-tools'; import { logger } from 'storybook/internal/node-logger...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/codemod/src/transforms/find-implicit-spies.ts
code/lib/codemod/src/transforms/find-implicit-spies.ts
import type { BabelFile } from 'storybook/internal/babel'; import { core as babel, types as t } from 'storybook/internal/babel'; import { loadCsf } from 'storybook/internal/csf-tools'; import type { FileInfo } from 'jscodeshift'; function findImplicitSpies(path: babel.NodePath, file: string, keys: string[]) { path....
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/codemod/src/transforms/upgrade-deprecated-types.ts
code/lib/codemod/src/transforms/upgrade-deprecated-types.ts
import { type BabelFile, type NodePath, core as babel, types as t } from 'storybook/internal/babel'; import { loadCsf, printCsf } from 'storybook/internal/csf-tools'; import { logger } from 'storybook/internal/node-logger'; import type { API, FileInfo } from 'jscodeshift'; import prettier from 'prettier'; const depre...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/codemod/src/transforms/__tests__/find-implicit-spies.test.ts
code/lib/codemod/src/transforms/__tests__/find-implicit-spies.test.ts
import { beforeEach, expect, test, vi } from 'vitest'; import ansiRegex from 'ansi-regex'; import { dedent } from 'ts-dedent'; import transform from '../find-implicit-spies'; expect.addSnapshotSerializer({ print: (val, print) => print((val as string).replace(ansiRegex(), '')), test: (value) => typeof value === '...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/codemod/src/transforms/__tests__/upgrade-deprecated-types.test.ts
code/lib/codemod/src/transforms/__tests__/upgrade-deprecated-types.test.ts
import { describe, expect, it } from 'vitest'; import ansiRegex from 'ansi-regex'; import type { API } from 'jscodeshift'; import { dedent } from 'ts-dedent'; import _transform from '../upgrade-deprecated-types'; expect.addSnapshotSerializer({ serialize: (val: any) => (typeof val === 'string' ? val : val.toString(...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/codemod/src/transforms/__tests__/csf-2-to-3.test.ts
code/lib/codemod/src/transforms/__tests__/csf-2-to-3.test.ts
import { describe, expect, it } from 'vitest'; import ansiRegex from 'ansi-regex'; import type { API } from 'jscodeshift'; import { dedent } from 'ts-dedent'; import _transform from '../csf-2-to-3'; expect.addSnapshotSerializer({ serialize: (val: any) => (typeof val === 'string' ? val : val.toString()), test: ()...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/codemod/src/lib/utils.ts
code/lib/codemod/src/lib/utils.ts
import { camelCase, upperFirst } from 'es-toolkit/string'; export const sanitizeName = (name: string) => { let key = upperFirst(camelCase(name)) as string; // prepend _ if name starts with a digit if (/^\d/.test(key)) { key = `_${key}`; } // prepend _ if name starts with a digit if (/^\d/.test(key)) { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/csf-plugin/vitest.config.ts
code/lib/csf-plugin/vitest.config.ts
import { defineConfig, mergeConfig } from 'vitest/config'; import { vitestCommonConfig } from '../../vitest.shared'; export default mergeConfig( vitestCommonConfig, defineConfig({ // Add custom config here }) );
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/csf-plugin/build-config.ts
code/lib/csf-plugin/build-config.ts
import type { BuildEntries } from '../../../scripts/build/utils/entry-utils'; const config: BuildEntries = { entries: { node: [ { exportEntries: ['.'], entryPoint: './src/index.ts', }, { exportEntries: ['./webpack-loader'], entryPoint: './src/webpack-loader.ts', ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/csf-plugin/src/rollup-based-plugin.ts
code/lib/csf-plugin/src/rollup-based-plugin.ts
import { readFile } from 'node:fs/promises'; import type { EnrichCsfOptions } from 'storybook/internal/csf-tools'; import { enrichCsf, formatCsf, loadCsf } from 'storybook/internal/csf-tools'; import { logger } from 'storybook/internal/node-logger'; import type { RollupPlugin } from 'unplugin'; import { STORIES_REGE...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/csf-plugin/src/webpack-loader.ts
code/lib/csf-plugin/src/webpack-loader.ts
import { readFile } from 'node:fs/promises'; import type { EnrichCsfOptions } from 'storybook/internal/csf-tools'; import { enrichCsf, formatCsf, loadCsf } from 'storybook/internal/csf-tools'; interface LoaderContext { async: () => (err: Error | null, result?: string, map?: any) => void; getOptions: () => EnrichC...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/csf-plugin/src/constants.ts
code/lib/csf-plugin/src/constants.ts
export const STORIES_REGEX = /(?<!node_modules.*)\.(story|stories)\.[tj]sx?$/;
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/csf-plugin/src/index.ts
code/lib/csf-plugin/src/index.ts
import { fileURLToPath } from 'node:url'; import type { EnrichCsfOptions } from 'storybook/internal/csf-tools'; import type { UnpluginFactory } from 'unplugin'; import { createUnplugin } from 'unplugin'; import { STORIES_REGEX } from './constants'; import { rollupBasedPlugin } from './rollup-based-plugin'; export t...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/react-dom-shim/build-config.ts
code/lib/react-dom-shim/build-config.ts
import type { BuildEntries } from '../../../scripts/build/utils/entry-utils'; const config: BuildEntries = { entries: { browser: [ { exportEntries: ['.'], entryPoint: './src/react-18.tsx', }, { exportEntries: ['./react-16'], entryPoint: './src/react-16.tsx', ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/react-dom-shim/src/react-16.tsx
code/lib/react-dom-shim/src/react-16.tsx
/* eslint-disable react/no-deprecated */ import type { ReactElement } from 'react'; import * as ReactDOM from 'react-dom'; export const renderElement = async (node: ReactElement, el: Element) => { return new Promise<null>((resolve) => { ReactDOM.render(node, el, () => resolve(null)); }); }; export const unmou...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/react-dom-shim/src/preset.ts
code/lib/react-dom-shim/src/preset.ts
import { readFile } from 'node:fs/promises'; import { isAbsolute, join } from 'node:path'; import type { Options } from 'storybook/internal/types'; import { resolvePackageDir } from '../../../core/src/shared/utils/module'; /** * Get react-dom version from the resolvedReact preset, which points to either a root reac...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/react-dom-shim/src/react-18.tsx
code/lib/react-dom-shim/src/react-18.tsx
/* eslint-disable @typescript-eslint/no-unnecessary-type-constraint */ import type { ReactElement } from 'react'; import * as React from 'react'; import type { Root as ReactRoot, RootOptions } from 'react-dom/client'; import * as ReactDOM from 'react-dom/client'; // A map of all rendered React 18 nodes const nodes = n...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/vitest.config.ts
code/lib/create-storybook/vitest.config.ts
import { defineConfig, mergeConfig } from 'vitest/config'; import { vitestCommonConfig } from '../../vitest.shared'; export default mergeConfig( vitestCommonConfig, defineConfig({ // Add custom config here }) );
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/build-config.ts
code/lib/create-storybook/build-config.ts
import type { BuildEntries } from '../../../scripts/build/utils/entry-utils'; const config: BuildEntries = { entries: { node: [ { exportEntries: ['.'], entryPoint: './src/index.ts', dts: false, }, { entryPoint: './src/bin/index.ts', dts: false, }, ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/initiate.test.ts
code/lib/create-storybook/src/initiate.test.ts
/** * NOTE: These tests use the VersionService from the refactored implementation. The promptNewUser * and promptInstallType functions are tested in: * * - Services/VersionService.test.ts (for version detection) * - Commands/UserPreferencesCommand.test.ts (for user prompts) */ import { describe, expect, it, vi } ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/typings.d.ts
code/lib/create-storybook/src/typings.d.ts
declare var CLI_APP_INSTANCE: ReturnType<typeof render> | undefined;
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/dependency-collector.test.ts
code/lib/create-storybook/src/dependency-collector.test.ts
import { beforeEach, describe, expect, it } from 'vitest'; import { DependencyCollector } from './dependency-collector'; describe('DependencyCollector', () => { let collector: DependencyCollector; beforeEach(() => { collector = new DependencyCollector(); }); describe('addDependencies', () => { it('s...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/scaffold-new-project.ts
code/lib/create-storybook/src/scaffold-new-project.ts
import { readdirSync } from 'node:fs'; import { rm } from 'node:fs/promises'; import { type PackageManagerName, executeCommand } from 'storybook/internal/common'; import { logger, prompt } from 'storybook/internal/node-logger'; import { GenerateNewProjectOnInitError } from 'storybook/internal/server-errors'; import { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/initiate.ts
code/lib/create-storybook/src/initiate.ts
import { ProjectType } from 'storybook/internal/cli'; import { type JsPackageManager, PackageManagerName, executeCommand, } from 'storybook/internal/common'; import { withTelemetry } from 'storybook/internal/core-server'; import { logTracker, logger } from 'storybook/internal/node-logger'; import { ErrorCollector...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/dependency-collector.ts
code/lib/create-storybook/src/dependency-collector.ts
export type DependencyType = 'dependencies' | 'devDependencies'; interface PackageInfo { name: string; version?: string; } export interface VersionConflict { packageName: string; existingVersion: string; newVersion: string; type: DependencyType; } /** * Collects all dependencies that need to be installe...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/index.ts
code/lib/create-storybook/src/index.ts
export { doInitiate as initiate } from './initiate';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/TelemetryService.ts
code/lib/create-storybook/src/services/TelemetryService.ts
import type { ProjectType } from 'storybook/internal/cli'; import { telemetry } from 'storybook/internal/telemetry'; import { Feature } from 'storybook/internal/types'; import { getProcessAncestry } from 'process-ancestry'; import { VersionService } from './VersionService'; /** Service for tracking telemetry events ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/FrameworkDetectionService.ts
code/lib/create-storybook/src/services/FrameworkDetectionService.ts
import { type JsPackageManager, getProjectRoot } from 'storybook/internal/common'; import { prompt } from 'storybook/internal/node-logger'; import type { SupportedRenderer } from 'storybook/internal/types'; import { SupportedBuilder, SupportedFramework } from 'storybook/internal/types'; import * as find from 'empathic...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/ProjectTypeService.test.ts
code/lib/create-storybook/src/services/ProjectTypeService.test.ts
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'; import { ProjectType } from 'storybook/internal/cli'; import type { JsPackageManager } from 'storybook/internal/common'; import { logger } from 'storybook/internal/node-logger'; import { NxProjectDetectedError } from 'storybook/internal/server-e...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/VersionService.ts
code/lib/create-storybook/src/services/VersionService.ts
import type { JsPackageManager } from 'storybook/internal/common'; import { versions } from 'storybook/internal/common'; import type { getProcessAncestry } from 'process-ancestry'; import { lt, prerelease } from 'semver'; /** Service for handling version-related operations during Storybook initialization */ export cl...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/ProjectTypeService.ts
code/lib/create-storybook/src/services/ProjectTypeService.ts
import { existsSync } from 'node:fs'; import { resolve } from 'node:path'; import { ProjectType } from 'storybook/internal/cli'; import { HandledError, getProjectRoot } from 'storybook/internal/common'; import type { JsPackageManager, PackageJsonWithMaybeDeps } from 'storybook/internal/common'; import { logger } from ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/TelemetryService.test.ts
code/lib/create-storybook/src/services/TelemetryService.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import { ProjectType } from 'storybook/internal/cli'; import { telemetry } from 'storybook/internal/telemetry'; import { Feature } from 'storybook/internal/types'; import { getProcessAncestry } from 'process-ancestry'; import { TelemetryService } from '....
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/VersionService.test.ts
code/lib/create-storybook/src/services/VersionService.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import type { JsPackageManager } from 'storybook/internal/common'; import { VersionService } from './VersionService'; vi.mock('storybook/internal/common', async () => { const actual = await vi.importActual('storybook/internal/common'); return { ....
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/AddonService.ts
code/lib/create-storybook/src/services/AddonService.ts
import { getPackageDetails } from 'storybook/internal/common'; import type { SupportedBuilder } from 'storybook/internal/types'; import { Feature } from 'storybook/internal/types'; export interface AddonConfiguration { addonsForMain: Array<string | { name: string; [key: string]: any }>; addonPackages: string[]; } ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/index.ts
code/lib/create-storybook/src/services/index.ts
/** * Core services for Storybook initialization * * These services provide centralized, testable functionality for the init process */ export { FeatureCompatibilityService } from './FeatureCompatibilityService'; export type { FeatureCompatibilityResult } from './FeatureCompatibilityService'; export { TelemetrySe...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/FrameworkDetectionService.test.ts
code/lib/create-storybook/src/services/FrameworkDetectionService.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import type { JsPackageManager } from 'storybook/internal/common'; import { prompt } from 'storybook/internal/node-logger'; import { SupportedBuilder, SupportedFramework, SupportedRenderer } from 'storybook/internal/types'; import * as find from 'empathic...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/FeatureCompatibilityService.ts
code/lib/create-storybook/src/services/FeatureCompatibilityService.ts
import { AddonVitestService, ProjectType } from 'storybook/internal/cli'; import type { JsPackageManager } from 'storybook/internal/common'; import type { SupportedBuilder, SupportedFramework } from 'storybook/internal/types'; /** Project types that support the onboarding feature */ const ONBOARDING_PROJECT_TYPES: Pro...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/FeatureCompatibilityService.test.ts
code/lib/create-storybook/src/services/FeatureCompatibilityService.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import { AddonVitestService, ProjectType } from 'storybook/internal/cli'; import type { JsPackageManager } from 'storybook/internal/common'; import { SupportedBuilder, SupportedFramework } from 'storybook/internal/types'; import { FeatureCompatibilityServ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/services/AddonService.test.ts
code/lib/create-storybook/src/services/AddonService.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import { Feature, SupportedBuilder } from 'storybook/internal/types'; import { AddonService } from './AddonService'; vi.mock('storybook/internal/common', async () => { const actual = await vi.importActual('storybook/internal/common'); return { .....
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/DependencyInstallationCommand.ts
code/lib/create-storybook/src/commands/DependencyInstallationCommand.ts
import { AddonVitestService } from 'storybook/internal/cli'; import type { JsPackageManager } from 'storybook/internal/common'; import { logger, prompt } from 'storybook/internal/node-logger'; import { ErrorCollector } from 'storybook/internal/telemetry'; import { Feature } from 'storybook/internal/types'; import type...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/GeneratorExecutionCommand.ts
code/lib/create-storybook/src/commands/GeneratorExecutionCommand.ts
import type { ProjectType } from 'storybook/internal/cli'; import { type JsPackageManager } from 'storybook/internal/common'; import { type Feature, type SupportedLanguage } from 'storybook/internal/types'; import type { DependencyCollector } from '../dependency-collector'; import { generatorRegistry } from '../genera...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/AddonConfigurationCommand.ts
code/lib/create-storybook/src/commands/AddonConfigurationCommand.ts
import { AddonVitestService } from 'storybook/internal/cli'; import { type JsPackageManager } from 'storybook/internal/common'; import { CLI_COLORS, logger, prompt } from 'storybook/internal/node-logger'; import { ErrorCollector } from 'storybook/internal/telemetry'; import { dedent } from 'ts-dedent'; import type { ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/FrameworkDetectionCommand.ts
code/lib/create-storybook/src/commands/FrameworkDetectionCommand.ts
import { type ProjectType } from 'storybook/internal/cli'; import { type JsPackageManager } from 'storybook/internal/common'; import { logger } from 'storybook/internal/node-logger'; import type { SupportedBuilder } from 'storybook/internal/types'; import { type SupportedRenderer } from 'storybook/internal/types'; impo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/UserPreferencesCommand.test.ts
code/lib/create-storybook/src/commands/UserPreferencesCommand.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import { AddonVitestService, ProjectType, globalSettings } from 'storybook/internal/cli'; import type { JsPackageManager } from 'storybook/internal/common'; import { PackageManagerName, isCI } from 'storybook/internal/common'; import { logger, prompt } fro...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/ProjectDetectionCommand.ts
code/lib/create-storybook/src/commands/ProjectDetectionCommand.ts
import { ProjectType } from 'storybook/internal/cli'; import type { JsPackageManager } from 'storybook/internal/common'; import { logger, prompt } from 'storybook/internal/node-logger'; import type { SupportedLanguage } from 'storybook/internal/types'; import picocolors from 'picocolors'; import { dedent } from 'ts-de...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/UserPreferencesCommand.ts
code/lib/create-storybook/src/commands/UserPreferencesCommand.ts
import type { ProjectType } from 'storybook/internal/cli'; import { globalSettings } from 'storybook/internal/cli'; import { type JsPackageManager, isCI } from 'storybook/internal/common'; import { logger, prompt } from 'storybook/internal/node-logger'; import type { SupportedBuilder, SupportedFramework } from 'storybo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/PreflightCheckCommand.ts
code/lib/create-storybook/src/commands/PreflightCheckCommand.ts
import { detectPnp } from 'storybook/internal/cli'; import { type JsPackageManager, JsPackageManagerFactory, PackageManagerName, invalidateProjectRootCache, } from 'storybook/internal/common'; import { CLI_COLORS, deprecate, logger } from 'storybook/internal/node-logger'; import { dedent } from 'ts-dedent'; i...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/AddonConfigurationCommand.test.ts
code/lib/create-storybook/src/commands/AddonConfigurationCommand.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import { type JsPackageManager } from 'storybook/internal/common'; import { logger, prompt } from 'storybook/internal/node-logger'; import { TelemetryService } from '../services/TelemetryService'; import { VersionService } from '../services/VersionService...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/FinalizationCommand.test.ts
code/lib/create-storybook/src/commands/FinalizationCommand.test.ts
import fs from 'node:fs/promises'; import { beforeEach, describe, expect, it, vi } from 'vitest'; import { getProjectRoot } from 'storybook/internal/common'; import { logger } from 'storybook/internal/node-logger'; import * as find from 'empathic/find'; import { FinalizationCommand } from './FinalizationCommand'; ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/PreflightCheckCommand.test.ts
code/lib/create-storybook/src/commands/PreflightCheckCommand.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import { JsPackageManagerFactory, PackageManagerName, invalidateProjectRootCache, } from 'storybook/internal/common'; import * as scaffoldModule from '../scaffold-new-project'; import { PreflightCheckCommand } from './PreflightCheckCommand'; vi.moc...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/ProjectDetectionCommand.test.ts
code/lib/create-storybook/src/commands/ProjectDetectionCommand.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import { ProjectType } from 'storybook/internal/cli'; import type { JsPackageManager } from 'storybook/internal/common'; import { HandledError, PackageManagerName } from 'storybook/internal/common'; import { logger, prompt } from 'storybook/internal/node-l...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/index.ts
code/lib/create-storybook/src/commands/index.ts
/** * Command classes for Storybook initialization workflow * * Each command represents a discrete step in the init process with clear responsibilities */ export { executePreflightCheck } from './PreflightCheckCommand'; export type { PreflightCheckResult } from './PreflightCheckCommand'; export { executeProjectDe...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/FinalizationCommand.ts
code/lib/create-storybook/src/commands/FinalizationCommand.ts
import fs from 'node:fs/promises'; import { getProjectRoot } from 'storybook/internal/common'; import { CLI_COLORS, logTracker, logger } from 'storybook/internal/node-logger'; import { ErrorCollector } from 'storybook/internal/telemetry'; import * as find from 'empathic/find'; import { dedent } from 'ts-dedent'; typ...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/DependencyInstallationCommand.test.ts
code/lib/create-storybook/src/commands/DependencyInstallationCommand.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import type { JsPackageManager } from 'storybook/internal/common'; import { Feature } from 'storybook/internal/types'; import { DependencyCollector } from '../dependency-collector'; import { DependencyInstallationCommand } from './DependencyInstallationCo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/commands/GeneratorExecutionCommand.test.ts
code/lib/create-storybook/src/commands/GeneratorExecutionCommand.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import { ProjectType } from 'storybook/internal/cli'; import { type JsPackageManager, PackageManagerName } from 'storybook/internal/common'; import { logger } from 'storybook/internal/node-logger'; import { Feature, SupportedBuilder, SupportedFramewo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/configure.ts
code/lib/create-storybook/src/generators/configure.ts
import { stat, writeFile } from 'node:fs/promises'; import { resolve } from 'node:path'; import { logger } from 'storybook/internal/node-logger'; import { Feature, SupportedLanguage } from 'storybook/internal/types'; import { dedent } from 'ts-dedent'; interface ConfigureMainOptions { addons: string[]; extension...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/GeneratorRegistry.ts
code/lib/create-storybook/src/generators/GeneratorRegistry.ts
import type { ProjectType } from 'storybook/internal/cli'; import { logger } from 'storybook/internal/node-logger'; import type { GeneratorModule } from './types'; /** * Registry for managing Storybook project generators * * All new generators should use the GeneratorModule format with metadata + configure. Legacy...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/registerGenerators.ts
code/lib/create-storybook/src/generators/registerGenerators.ts
import angularGenerator from './ANGULAR'; import emberGenerator from './EMBER'; import { generatorRegistry } from './GeneratorRegistry'; import htmlGenerator from './HTML'; import nextjsGenerator from './NEXTJS'; import nuxtGenerator from './NUXT'; import preactGenerator from './PREACT'; import qwikGenerator from './QW...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/configure.test.ts
code/lib/create-storybook/src/generators/configure.test.ts
import type { Stats } from 'node:fs'; import * as fsp from 'node:fs/promises'; import { beforeAll, describe, expect, it, vi } from 'vitest'; import { Feature, SupportedLanguage } from 'storybook/internal/types'; import { dedent } from 'ts-dedent'; import { configureMain, configurePreview } from './configure'; vi.m...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/GeneratorRegistry.test.ts
code/lib/create-storybook/src/generators/GeneratorRegistry.test.ts
import { beforeEach, describe, expect, it, vi } from 'vitest'; import { ProjectType } from 'storybook/internal/cli'; import { logger } from 'storybook/internal/node-logger'; import { SupportedRenderer } from 'storybook/internal/types'; import { GeneratorRegistry } from './GeneratorRegistry'; import type { GeneratorMo...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/types.ts
code/lib/create-storybook/src/generators/types.ts
import type { NpmOptions, ProjectType } from 'storybook/internal/cli'; import type { JsPackageManager, PackageManagerName } from 'storybook/internal/common'; import type { ConfigFile } from 'storybook/internal/csf-tools'; import type { Feature, StorybookConfig, SupportedBuilder, SupportedFramework, SupportedL...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/index.ts
code/lib/create-storybook/src/generators/index.ts
/** * Generator registry and utilities * * Provides a centralized way to manage and access Storybook generators */ export { GeneratorRegistry, generatorRegistry } from './GeneratorRegistry'; export { registerAllGenerators } from './registerGenerators';
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/baseGenerator.ts
code/lib/create-storybook/src/generators/baseGenerator.ts
import { mkdir } from 'node:fs/promises'; import { dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; import { type NpmOptions, configureEslintPlugin, copyTemplateFiles, extractEslintInfo, } from 'storybook/internal/cli'; import { type JsPackageManager, frameworkPackages, getPack...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/NUXT/index.ts
code/lib/create-storybook/src/generators/NUXT/index.ts
import { ProjectType } from 'storybook/internal/cli'; import { logger } from 'storybook/internal/node-logger'; import { Feature, SupportedBuilder, SupportedFramework, SupportedRenderer, } from 'storybook/internal/types'; import { defineGeneratorModule } from '../modules/GeneratorModule'; export default define...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/EMBER/index.ts
code/lib/create-storybook/src/generators/EMBER/index.ts
import { ProjectType } from 'storybook/internal/cli'; import { SupportedBuilder, SupportedFramework, SupportedRenderer } from 'storybook/internal/types'; import { defineGeneratorModule } from '../modules/GeneratorModule'; export default defineGeneratorModule({ metadata: { projectType: ProjectType.EMBER, ren...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/REACT_NATIVE_AND_RNW/index.ts
code/lib/create-storybook/src/generators/REACT_NATIVE_AND_RNW/index.ts
import { ProjectType } from 'storybook/internal/cli'; import { SupportedBuilder, SupportedFramework, SupportedRenderer } from 'storybook/internal/types'; import reactNativeGeneratorModule from '../REACT_NATIVE'; import reactNativeWebGeneratorModule from '../REACT_NATIVE_WEB'; import { defineGeneratorModule } from '../...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/SOLID/index.ts
code/lib/create-storybook/src/generators/SOLID/index.ts
import { ProjectType } from 'storybook/internal/cli'; import { SupportedBuilder, SupportedFramework, SupportedRenderer } from 'storybook/internal/types'; import { defineGeneratorModule } from '../modules/GeneratorModule'; export default defineGeneratorModule({ metadata: { projectType: ProjectType.SOLID, ren...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false
storybookjs/storybook
https://github.com/storybookjs/storybook/blob/7f193d38eec36246a211339c1f352cca246de779/code/lib/create-storybook/src/generators/SERVER/index.ts
code/lib/create-storybook/src/generators/SERVER/index.ts
import { ProjectType } from 'storybook/internal/cli'; import { SupportedBuilder, SupportedRenderer } from 'storybook/internal/types'; import { defineGeneratorModule } from '../modules/GeneratorModule'; // Export as module export default defineGeneratorModule({ metadata: { projectType: ProjectType.SERVER, re...
typescript
MIT
7f193d38eec36246a211339c1f352cca246de779
2026-01-04T15:25:31.846427Z
false