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 8.1.4+ support for v5 index.json #475

Merged
merged 2 commits into from
May 29, 2024
Merged
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
5 changes: 3 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,8 @@ export const transformPlaywrightJson = (index: V3StoriesIndex | V4Index | Unsupp
Object.values((index as V3StoriesIndex).stories)
);
titleIdToEntries = v3TitleMapToV4TitleMap(titleIdToStories);
} else if (index.v === 4) {
// v4 and v5 are pretty much similar, so we process it in the same way
} else if (index.v === 4 || index.v === 5) {
yannbf marked this conversation as resolved.
Show resolved Hide resolved
// 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
Loading