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: Fix story index for CSF default exports as TS vars #18054

Merged
merged 2 commits into from Apr 26, 2022

Conversation

shilman
Copy link
Member

@shilman shilman commented Apr 25, 2022

Issue: N/A

It was reported that Button.stories.tsx was not showing up in the sidebar when storyStoreV7 was being used.

Repro here from @dannyhw https://github.com/dannyhw/ReproStoryStoreV7

What I did

This is an unhandled case in the code. I fixed the code by first checking if the default export is a variable declaration, and then applying the logic to either the declaration itself or the variable that it references.

This will handle the TS "as" case, and whatever other cases come up.

How to test

See attached unit test

@nx-cloud
Copy link

nx-cloud bot commented Apr 25, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 28d1832. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@shilman shilman added bug patch:yes Bugfix & documentation PR that need to be picked to main branch core on-demand store labels Apr 25, 2022
Copy link
Member

@dannyhw dannyhw left a comment

Choose a reason for hiding this comment

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

💯

@shilman shilman merged commit 8e35c02 into next Apr 26, 2022
@shilman shilman deleted the fix/csf-tools-ts-meta-var branch April 26, 2022 05:36
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Apr 27, 2022
shilman added a commit that referenced this pull request Apr 27, 2022
Core: Fix story index for CSF default exports as TS vars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core on-demand store patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants