Skip to content

Commit

Permalink
CLI: Remove duplicated "duplicated dependency" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Mar 8, 2024
1 parent fc222b9 commit df71b26
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 38 deletions.
30 changes: 1 addition & 29 deletions code/lib/cli/src/automigrate/helpers/getMigrationSummary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
`);
});

Expand Down
9 changes: 0 additions & 9 deletions code/lib/cli/src/automigrate/helpers/getMigrationSummary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit df71b26

Please sign in to comment.