8000 Fix moduleName resolution for Storybook files with import cycles. by jmhobbs · Pull Request #1157 · chromaui/chromatic-cli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix moduleName resolution for Storybook files with import cycles. #1157

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

Conversation

jmhobbs
Copy link
Contributor
@jmhobbs jmhobbs commented Feb 19, 2025

Newer versions of our webpack builder is now emitting resolvedModule, or perhaps always did in an undocumented manner.

This is generally not a problem, as we used resolvedModule for rspack and it is generally null from webpack, but when you have import cycles you can get a value which is not what we desire from it.

Removing it works with current rspack builders as well.

📦 Published PR as canary version: 11.26.2--canary.1157.13548091166.0

✨ Test out this PR locally via:

npm install chromatic@11.26.2--canary.1157.13548091166.0
# or 
yarn add chromatic@11.26.2--canary.1157.13548091166.0

Fix moduleName resolution for Storybook files with import cycles.
@jmhobbs jmhobbs self-assigned this Feb 19, 2025
@jmhobbs jmhobbs added release Auto: Create a `latest` release when merged patch Auto: Increment the patch version when merged labels Feb 19, 2025
Copy link
Contributor

📦 Package Size: 5448 KB
✅ Compared to main: 0 KB 625c2c3 (5448 KB)

Copy link
codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.98%. Comparing base (625c2c3) to head (24c874b).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
node-src/lib/getDependentStoryFiles.ts 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1157      +/-   ##
==========================================
- Coverage   70.01%   69.98%   -0.03%     
==========================================
  Files         202      202              
  Lines        7361     7357       -4     
  Branches     1301     1302       +1     
==========================================
- Hits         5154     5149       -5     
- Misses       2184     2185       +1     
  Partials       23       23              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jmhobbs jmhobbs marked this pull request as ready for review February 24, 2025 23:15
Copy link
Contributor
@codykaup codykaup left a comment

Choose a reason for hiding this comment

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

LGTM!

@jmhobbs jmhobbs merged commit 9204a66 into main Feb 26, 2025
24 of 28 checks passed
@jmhobbs jmhobbs deleted the jmhobbs/cap-2648-turbosnap-doesnt-work-as-expected-in-ci-with-the-workingdir branch February 26, 2025 15:57
@chromatic-ci-bot
Copy link
Collaborator

🚀 PR was released in v11.26.1 🚀

@chromatic-ci-bot chromatic-ci-bot added the released Verdict: This issue/pull request has been released label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Auto: Increment the patch version when merged release Auto: Create a `latest` release when merged released Verdict: This issue/pull request has been released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0