Skip to content

Commit

Permalink
fix(storybook): ignore experimental packages during migrating to v14
Browse files Browse the repository at this point in the history
  • Loading branch information
puku0x committed Apr 23, 2022
1 parent fda454c commit 72f1d12
Showing 1 changed file with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ export function migrateStorybookInstance(
function maybeUpdateVersion(tree: Tree): GeneratorCallback {
let needsInstall = false;
updateJson(tree, 'package.json', (json) => {
const ignoredStorybookPackages = [
'@storybook/builder-vite',
'@storybook/jest',
'@storybook/react-native',
'@storybook/storybook-deployer',
'@storybook/test-runner',
'@storybook/testing-library',
'@storybook/testing-angular',
'@storybook/testing-react',
'@storybook/testing-vue',
'@storybook/testing-vue3',
];

json.dependencies = json.dependencies || {};
json.devDependencies = json.devDependencies || {};

Expand All @@ -84,17 +97,15 @@ function maybeUpdateVersion(tree: Tree): GeneratorCallback {
).filter(
(packageName: string) =>
packageName.startsWith('@storybook/') &&
!packageName.includes('@storybook/react-native') &&
!packageName.includes('@storybook/storybook-deployer')
!ignoredStorybookPackages.includes(packageName)
);

const allStorybookPackagesInDevDependencies = Object.keys(
json.devDependencies
).filter(
(packageName: string) =>
packageName.startsWith('@storybook/') &&
!packageName.includes('@storybook/react-native') &&
!packageName.includes('@storybook/storybook-deployer')
!ignoredStorybookPackages.includes(packageName)
);

const storybookPackages = [
Expand Down

0 comments on commit 72f1d12

Please sign in to comment.