diff --git a/code/lib/cli/src/automigrate/helpers/getMigrationSummary.test.ts b/code/lib/cli/src/automigrate/helpers/getMigrationSummary.test.ts index eb49848ab2c0..92c9c91c9f04 100644 --- a/code/lib/cli/src/automigrate/helpers/getMigrationSummary.test.ts +++ b/code/lib/cli/src/automigrate/helpers/getMigrationSummary.test.ts @@ -104,7 +104,7 @@ describe('getMigrationSummary', () => { ───────────────────────────────────────────────── - If you'd like to run the migrations again, you can do so by running 'npx storybook@next automigrate' + If you'd like to run the migrations again, you can do so by running 'npx storybook automigrate' The automigrations try to migrate common patterns in your project, but might not contain everything needed to migrate to the latest version of Storybook. @@ -124,7 +124,7 @@ describe('getMigrationSummary', () => { expect(summary).toMatchInlineSnapshot(` "No migrations were applicable to your project - If you'd like to run the migrations again, you can do so by running 'npx storybook@next automigrate' + If you'd like to run the migrations again, you can do so by running 'npx storybook automigrate' The automigrations try to migrate common patterns in your project, but might not contain everything needed to migrate to the latest version of Storybook. @@ -144,7 +144,7 @@ describe('getMigrationSummary', () => { expect(summary).toMatchInlineSnapshot(` "No migrations were applicable to your project - If you'd like to run the migrations again, you can do so by running 'npx storybook@next automigrate' + If you'd like to run the migrations again, you can do so by running 'npx storybook automigrate' The automigrations try to migrate common patterns in your project, but might not contain everything needed to migrate to the latest version of Storybook. diff --git a/code/lib/cli/src/automigrate/helpers/getMigrationSummary.ts b/code/lib/cli/src/automigrate/helpers/getMigrationSummary.ts index 12c8ac07bfa7..e0f708543bef 100644 --- a/code/lib/cli/src/automigrate/helpers/getMigrationSummary.ts +++ b/code/lib/cli/src/automigrate/helpers/getMigrationSummary.ts @@ -1,7 +1,7 @@ import chalk from 'chalk'; import boxen from 'boxen'; import dedent from 'ts-dedent'; -import type { InstallationMetadata } from '@storybook/core-common'; +import { type InstallationMetadata } from '@storybook/core-common'; import type { FixSummary } from '../types'; import { FixStatus } from '../types'; @@ -63,7 +63,7 @@ export function getMigrationSummary({ messages.push(getGlossaryMessages(fixSummary, fixResults, logFile).join(messageDivider)); messages.push(dedent`If you'd like to run the migrations again, you can do so by running '${chalk.cyan( - 'npx storybook@next automigrate' + 'npx storybook automigrate' )}' The automigrations try to migrate common patterns in your project, but might not contain everything needed to migrate to the latest version of Storybook. diff --git a/code/lib/cli/src/doctor/index.ts b/code/lib/cli/src/doctor/index.ts index 69884c2f6755..2dfecaa96d17 100644 --- a/code/lib/cli/src/doctor/index.ts +++ b/code/lib/cli/src/doctor/index.ts @@ -15,7 +15,6 @@ import { getIncompatibleStorybookPackages, } from './getIncompatibleStorybookPackages'; import { getDuplicatedDepsWarnings } from './getDuplicatedDepsWarnings'; -import { isPrerelease } from './utils'; const logger = console; const LOG_FILE_NAME = 'doctor-storybook.log'; @@ -141,12 +140,8 @@ export const doctor = async ({ } } - const doctorCommand = isPrerelease(storybookVersion) - ? 'npx storybook@next doctor' - : 'npx storybook@latest doctor'; - const commandMessage = `You can always recheck the health of your project by running:\n${chalk.cyan( - doctorCommand + 'npx storybook doctor' )}`; logger.info(); diff --git a/code/lib/core-events/src/errors/server-errors.ts b/code/lib/core-events/src/errors/server-errors.ts index c8eccef6eb2a..85bf7cda02c4 100644 --- a/code/lib/core-events/src/errors/server-errors.ts +++ b/code/lib/core-events/src/errors/server-errors.ts @@ -77,7 +77,7 @@ export class MissingFrameworkFieldError extends StorybookError { return dedent` Could not find a 'framework' field in Storybook config. - Please run 'npx storybook@next automigrate' to automatically fix your config. + Please run 'npx storybook automigrate' to automatically fix your config. `; } } @@ -98,7 +98,7 @@ export class InvalidFrameworkNameError extends StorybookError { return dedent` Invalid value of '${this.data.frameworkName}' in the 'framework' field of Storybook config. - Please run 'npx storybook@next automigrate' to automatically fix your config. + Please run 'npx storybook automigrate' to automatically fix your config. `; } } @@ -276,7 +276,7 @@ export class AngularLegacyBuildOptionsError extends StorybookError { Your Storybook startup script uses a solution that is not supported anymore. You must use Angular builder to have an explicit configuration on the project used in angular.json. - Please run 'npx storybook@next automigrate' to automatically fix your config. + Please run 'npx storybook automigrate' to automatically fix your config. `; } } @@ -390,7 +390,7 @@ export class NoMatchingExportError extends StorybookError { Correct example: { "@storybook/react": "7.5.3", "@storybook/react-vite": "7.5.3", "storybook": "7.5.3" } - Please run \`npx storybook@latest doctor\` for guidance on how to fix this issue. + Please run \`npx storybook doctor\` for guidance on how to fix this issue. `; } } @@ -557,7 +557,7 @@ export class UpgradeStorybookToSameVersionError extends StorybookError { If you intended to re-run automigrations, you should run the "automigrate" command directly instead: - "npx storybook@${this.data.beforeVersion} automigrate" + "npx storybook automigrate" `; } }