Skip to content
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
8 changes: 8 additions & 0 deletions code/lib/create-storybook/src/services/VersionService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ describe('VersionService', () => {
expect(integration).toBe('create-rsbuild');
});

it('should NOT detect creatersbuild without separator', () => {
const ancestry = [{ command: 'npx creatersbuild' }];

const integration = versionService.getCliIntegrationFromAncestry(ancestry as any);

expect(integration).toBeUndefined();
});

it('should detect @tanstack/start command', () => {
const ancestry = [{ command: 'npx @tanstack/start@latest create my-app' }];

Expand Down
2 changes: 1 addition & 1 deletion code/lib/create-storybook/src/services/VersionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class VersionService {
return svMatch[1].toLowerCase().includes('add') ? 'sv add' : 'sv create';
}
// Check for create-rsbuild or create rsbuild
const rsbuildMatch = ancestor.command?.match(/(?:^|\s)create[\s\-]?rsbuild/i);
const rsbuildMatch = ancestor.command?.match(/(?:^|\s)create[\s\-]rsbuild/i);
if (rsbuildMatch) {
return 'create-rsbuild';
}
Expand Down
Loading