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

Core: Remove more .stories.mdx handling #25973

Merged
merged 6 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Restore back-compat code
  • Loading branch information
shilman committed Jun 10, 2024
commit c388109586094350ccea098a81a566b2a737c672
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shilman does this change look safe to you? this is the only significant thing in this PR, the rest are just tests and telemetry

Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const transformSetStoriesStoryDataToPreparedStoryIndex = (
if (docsOnly) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will docsOnly exist anymore after we get rid of .stories.mdx support @tmeasday ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but this code is back compat for composition, is it not @shilman ?

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