new-frameworks: account for angular

This commit is contained in:
Yann Braga 2023-01-25 20:42:52 +01:00
parent bdf56cd566
commit 9b56a368c6
2 changed files with 16 additions and 0 deletions

View File

@ -91,6 +91,18 @@ describe('new-frameworks fix', () => {
).resolves.toBeFalsy();
});
it('in sb 7 with correct structure already', async () => {
const packageJson = { dependencies: { '@storybook/angular': '^7.0.0' } };
await expect(
checkNewFrameworks({
packageJson,
main: {
framework: '@storybook/angular',
},
})
).resolves.toBeFalsy();
});
// TODO: once we have a @storybook/vue-vite framework, we should remove this test
it('in sb 7 with vue and vite', async () => {
const packageJson = {

View File

@ -183,6 +183,10 @@ export const newFrameworks: Fix<NewFrameworkRunOptions> = {
`);
}
if (!dependenciesToRemove.length && !dependenciesToAdd.length) {
return null;
}
return {
main,
dependenciesToAdd,