Merge pull request #19129 from storybookjs/tech/do-not-remove-old-framewokr-automigrate

do not remove the old framework, because that's now the renderer
This commit is contained in:
Norbert de Langen 2022-09-13 15:17:36 +03:00 committed by GitHub
commit eefcfeb208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 8 deletions

View File

@ -2,6 +2,7 @@ import path from 'path';
import { DefinePlugin, HotModuleReplacementPlugin, ProgressPlugin, ProvidePlugin } from 'webpack';
import type { Configuration } from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
// @ts-ignore
import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin';
import TerserWebpackPlugin from 'terser-webpack-plugin';
import VirtualModulePlugin from 'webpack-virtual-modules';

View File

@ -64,7 +64,7 @@ describe('new-frameworks fix', () => {
expect.objectContaining({
frameworkPackage: '@storybook/vue-webpack5',
dependenciesToAdd: ['@storybook/vue-webpack5'],
dependenciesToRemove: ['@storybook/vue'],
dependenciesToRemove: [],
})
);
});
@ -159,11 +159,7 @@ describe('new-frameworks fix', () => {
expect.objectContaining({
frameworkPackage: '@storybook/react-webpack5',
dependenciesToAdd: ['@storybook/react-webpack5'],
dependenciesToRemove: [
'@storybook/builder-webpack5',
'@storybook/manager-webpack5',
'@storybook/react',
],
dependenciesToRemove: ['@storybook/builder-webpack5', '@storybook/manager-webpack5'],
frameworkOptions: {
fastRefresh: true,
},
@ -243,7 +239,7 @@ describe('new-frameworks fix', () => {
expect.objectContaining({
frameworkPackage: '@storybook/react-vite',
dependenciesToAdd: ['@storybook/react-vite'],
dependenciesToRemove: ['@storybook/builder-vite', '@storybook/react'],
dependenciesToRemove: ['@storybook/builder-vite'],
})
);
});

View File

@ -163,7 +163,6 @@ export const newFrameworks: Fix<NewFrameworkRunOptions> = {
// some frameworks didn't change e.g. Angular, Ember
if (newFrameworkPackage !== frameworkPackage) {
dependenciesToRemove.push(frameworkPackage);
dependenciesToAdd.push(newFrameworkPackage);
}