Skip to content

Commit

Permalink
fix(storybook): do not throw for versions >=7 (#20770)
Browse files Browse the repository at this point in the history
  • Loading branch information
mandarini authored and jaysoo committed Dec 14, 2023
1 parent 24805db commit e2f8b96
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default async function buildStorybookExecutor(
context: ExecutorContext
) {
storybookConfigExistsCheck(options.configDir, context.projectName);
const storybook7 = storybookMajorVersion() === 7;
const storybook7 = storybookMajorVersion() >= 7;
if (!storybook7) {
throw pleaseUpgrade();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default async function* storybookExecutor(
success: boolean;
info?: { port: number; baseUrl?: string };
}> {
const storybook7 = storybookMajorVersion() === 7;
const storybook7 = storybookMajorVersion() >= 7;
if (!storybook7) {
throw pleaseUpgrade();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/storybook/src/generators/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function checkDependenciesInstalled(host: Tree, schema: Schema) {

let storybook7VersionToInstall = storybookVersion;
if (
storybookMajorVersion() === 7 &&
storybookMajorVersion() >= 7 &&
getInstalledStorybookVersion() &&
gte(getInstalledStorybookVersion(), '7.0.0')
) {
Expand Down

0 comments on commit e2f8b96

Please sign in to comment.