CLI: Remove duplicated "duplicated dependency" warning

This commit is contained in:
Yann Braga 2024-03-08 13:32:54 +01:00
parent fc222b9b97
commit df71b263e4
2 changed files with 1 additions and 38 deletions

View File

@ -129,35 +129,7 @@ describe('getMigrationSummary', () => {
The automigrations try to migrate common patterns in your project, but might not contain everything needed to migrate to the latest version of Storybook.
Please check the changelog and migration guide for manual migrations and more information: https://storybook.js.org/docs/8.0/migration-guide
And reach out on Discord if you need help: https://discord.gg/storybook
Critical: The following dependencies are duplicated and WILL cause unexpected behavior:
@storybook/instrumenter:
6.0.0, 7.1.0
@storybook/core-common:
6.0.0, 7.1.0
Attention: The following dependencies are duplicated which might cause unexpected behavior:
@storybook/addon-essentials:
7.0.0, 7.1.0
Please try de-duplicating these dependencies by running yarn dedupe
You can find more information for a given dependency by running yarn why <package-name>"
And reach out on Discord if you need help: https://discord.gg/storybook"
`);
});

View File

@ -4,7 +4,6 @@ import dedent from 'ts-dedent';
import type { InstallationMetadata } from '@storybook/core-common';
import type { FixSummary } from '../types';
import { FixStatus } from '../types';
import { getDuplicatedDepsWarnings } from '../../doctor/getDuplicatedDepsWarnings';
export const messageDivider = '\n\n';
const segmentDivider = '\n\n─────────────────────────────────────────────────\n\n';
@ -75,14 +74,6 @@ export function getMigrationSummary({
And reach out on Discord if you need help: ${chalk.yellow('https://discord.gg/storybook')}
`);
const duplicatedDepsMessage = installationMetadata
? getDuplicatedDepsWarnings(installationMetadata)
: getDuplicatedDepsWarnings();
if (duplicatedDepsMessage) {
messages.push(duplicatedDepsMessage.join(messageDivider));
}
const hasNoFixes = Object.values(fixResults).every((r) => r === FixStatus.UNNECESSARY);
const hasFailures = Object.values(fixResults).some(
(r) => r === FixStatus.FAILED || r === FixStatus.CHECK_FAILED