Skip to content

Commit

Permalink
Fix 8.1.4+ support for v5 index.json
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed May 29, 2024
1 parent e8c15d5 commit 4112e69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/playwright/transformPlaywrightJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function v3TitleMapToV4TitleMap(titleIdToStories: Record<string, V3Story[]>) {
({
type: isV3DocsOnly(stories) ? 'docs' : 'story',
...story,
} satisfies V4Entry)
}) satisfies V4Entry
),
])
);
Expand All @@ -120,7 +120,7 @@ export const transformPlaywrightJson = (index: V3StoriesIndex | V4Index | Unsupp
Object.values((index as V3StoriesIndex).stories)
);
titleIdToEntries = v3TitleMapToV4TitleMap(titleIdToStories);
} else if (index.v === 4) {
} else if (index.v === 4 || index.v === 5) {
// TODO: Once Storybook 8.0 is released, we should only support v4 and higher
titleIdToEntries = groupByTitleId<V4Entry>(Object.values((index as V4Index).entries));
} else {
Expand Down

0 comments on commit 4112e69

Please sign in to comment.