Refactor imports to remove deprecated references to SupportedRenderers in project_types and update related files accordingly

This commit is contained in:
Valentin Palkovic 2025-03-26 08:50:13 +01:00
parent 612db21e81
commit 913d2d433e
3 changed files with 3 additions and 9 deletions

View File

@ -3,13 +3,13 @@ import { dirname, join } from 'node:path';
import { temporaryDirectory, versions } from 'storybook/internal/common';
import type { JsPackageManager } from 'storybook/internal/common';
import type { SupportedFrameworks } from 'storybook/internal/types';
import type { SupportedRenderers } from 'storybook/internal/types';
import downloadTarballDefault from '@ndelangen/get-tarball';
import getNpmTarballUrlDefault from 'get-npm-tarball-url';
import invariant from 'tiny-invariant';
import { externalFrameworks } from './project_types';
import type { SupportedRenderers } from './project_types';
const resolveUsingBranchInstall = async (packageManager: JsPackageManager, request: string) => {
const tempDirectory = await temporaryDirectory();

View File

@ -4,12 +4,12 @@ import fsp from 'node:fs/promises';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { JsPackageManager } from 'storybook/internal/common';
import type { SupportedRenderers } from 'storybook/internal/types';
import { sep } from 'path';
import { IS_WINDOWS } from '../../../vitest.helpers';
import * as helpers from './helpers';
import type { SupportedRenderers } from './project_types';
import { SupportedLanguage } from './project_types';
const normalizePath = (path: string) => (IS_WINDOWS ? path.replace(/\//g, sep) : path);

View File

@ -1,7 +1,4 @@
import type {
SupportedRenderers as CoreSupportedRenderers,
SupportedFrameworks,
} from 'storybook/internal/types';
import type { SupportedFrameworks, SupportedRenderers } from 'storybook/internal/types';
import { minVersion, validRange } from 'semver';
@ -32,9 +29,6 @@ export const externalFrameworks: ExternalFramework[] = [
},
];
/** @deprecated Please use `SupportedRenderers` from `storybook/internal/types` instead */
export type SupportedRenderers = CoreSupportedRenderers;
export const SUPPORTED_RENDERERS: SupportedRenderers[] = [
'react',
'react-native',