Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(storybook): update version check #27278

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ export default async function* storybookExecutor(
success: boolean;
info?: { port: number; baseUrl?: string };
}> {
const storybook7 = storybookMajorVersion() >= 7;
if (!storybook7) {
const sbVersion = storybookMajorVersion();
const sbLessThan7 = sbVersion < 7 && sbVersion > 0;

if (sbLessThan7) {
throw pleaseUpgrade();
}
storybookConfigExistsCheck(options.configDir, context.projectName);
Expand Down
2 changes: 1 addition & 1 deletion packages/storybook/src/utils/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export function getTsSourceFile(host: Tree, path: string): ts.SourceFile {

export function pleaseUpgrade(): string {
return `
Storybook 6 is no longer maintained, and not supported in Nx.
Storybook 6 and lower are no longer maintained, and not supported in Nx.
Please upgrade to Storybook 7.
Here is a guide on how to upgrade:
Expand Down