Skip to content

Commit

Permalink
Restore back-compat code
Browse files Browse the repository at this point in the history
  • Loading branch information
shilman committed Jun 10, 2024
1 parent 5e4d590 commit c388109
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions code/lib/manager-api/src/lib/stories.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ describe('transformStoryIndexV3toV4', () => {
"docsOnly": true,
},
"storiesImports": [],
"tags": [
"stories-mdx",
],
"title": "Story 1",
"type": "docs",
},
Expand Down
3 changes: 2 additions & 1 deletion code/lib/manager-api/src/lib/stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const transformSetStoriesStoryDataToPreparedStoryIndex = (
if (docsOnly) {
acc[id] = {
type: 'docs',
tags: ['stories-mdx'],
storiesImports: [],
...base,
};
Expand Down Expand Up @@ -122,7 +123,7 @@ export const transformStoryIndexV3toV4 = (index: StoryIndexV3): API_PreparedStor
}
acc[entry.id] = {
type,
...(type === 'docs' && { storiesImports: [] }),
...(type === 'docs' && { tags: ['stories-mdx'], storiesImports: [] }),
...entry,
};

Expand Down

0 comments on commit c388109

Please sign in to comment.