-
Notifications
You must be signed in to change notification settings - Fork 71
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
Properly check storybookBaseDir
against repository root rather than CWD
#974
Conversation
…urrent working directory
@@ -22,7 +24,7 @@ export async function checkStorybookBaseDir(ctx: Context, stats: Stats) { | |||
await Promise.any( | |||
sourceModuleFiles.map((file) => { | |||
return limitConcurrency(() => { | |||
const absolutePath = path.join(storybookBaseDir, file.name); | |||
const absolutePath = path.join(repositoryRoot, storybookBaseDir, file.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghengeveld What is the validity of this suggestion? It seems fair.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ultimately, this looks fine. Can we add a test for this?
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy will stop sending the deprecated coverage status from June 5th, 2024. Learn more Footnotes
|
🚀 PR was released in |
The
storybookBaseDir
option was being checked as a relative path, which causedcheckStorybookBaseDir
to fail when running Storybook from a subdirectory rather than the repository root. This PR ensures we use the repository root rather than the current working directory when checking thestorybookBaseDir
value.📦 Published PR as canary version:
11.3.2--canary.974.8981931033.0
✨ Test out this PR locally via:
npm install chromatic@11.3.2--canary.974.8981931033.0 # or yarn add chromatic@11.3.2--canary.974.8981931033.0