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

fix: prevent sb runtime errors #2577

Merged
merged 1 commit into from
Feb 12, 2025
Merged

fix: prevent sb runtime errors #2577

merged 1 commit into from
Feb 12, 2025

Conversation

acd02
Copy link
Contributor

@acd02 acd02 commented Feb 11, 2025

Description, Motivation and Context

Prevent runtime errors, see storybookjs/storybook#30115

Types of changes

  • 🛠️ Tool
  • 🪲 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 🧾 Documentation
  • 📷 Demo
  • 🧪 Test
  • 🧠 Refactor
  • 💄 Styles

@soykje
Copy link
Contributor

soykje commented Feb 11, 2025

It's broken... Btw, did you try to simply force and freeze esbuild version? 🤔

@acd02
Copy link
Contributor Author

acd02 commented Feb 11, 2025

It's broken... Btw, did you try to simply force and freeze esbuild version? 🤔

yes, it does not seem to work 🥲

@Powerplex
Copy link
Member

It's broken because config/plugins/sparkDocgen/utils.ts was also importing import { docgenConfig } from './constants' which no longer exists.

@acd02 acd02 force-pushed the fix-sb-runtime-errors branch from d91da41 to acb7a65 Compare February 12, 2025 09:05
@acd02 acd02 changed the title fix: move docgenConfig into main.js to prevent runtime errors fix: prevent sb runtime errors Feb 12, 2025
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.50%. Comparing base (6f10b19) to head (acb7a65).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2577   +/-   ##
=======================================
  Coverage   96.50%   96.50%           
=======================================
  Files         520      520           
  Lines        4612     4612           
  Branches     1644     1644           
=======================================
  Hits         4451     4451           
  Misses        159      159           
  Partials        2        2           

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

@acd02
Copy link
Contributor Author

acd02 commented Feb 12, 2025

Seems like adding the ⁠.ts extension to the import does the trick 🤷 😄

import { docgenConfig } from '../config/plugins/sparkDocgen/constants.ts'

@acd02 acd02 merged commit ffbe789 into main Feb 12, 2025
9 checks passed
@acd02 acd02 deleted the fix-sb-runtime-errors branch February 12, 2025 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants