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

Add CJS output of preview entry #67

Merged
merged 3 commits into from
Mar 18, 2024
Merged

Add CJS output of preview entry #67

merged 3 commits into from
Mar 18, 2024

Conversation

JReinhold
Copy link
Collaborator

Add CJS preview entry, to be used by Jest when using Portable Stories

package.json Show resolved Hide resolved
@JReinhold JReinhold self-assigned this Mar 12, 2024
@JReinhold JReinhold requested a review from ndelangen March 12, 2024 19:12
@vanessayuenn vanessayuenn added this to the 8.0-stabilization milestone Mar 12, 2024
"@storybook/preview-api": "8.0.0-beta.2",
"@storybook/react": "8.0.0-beta.2",
"@storybook/react-vite": "8.0.0-beta.2",
"@storybook/addon-essentials": "8.0.0",
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't the deps be ^8.0.0 instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is actually on purpose, originally discussed here #59

tl;dr by pinning to 8.0.0 (similar to what we did for 7.0.0) we're encouraging addon authors to support the whole major version range instead of just the latest minor release. If they specifically need an API from a later minor, they can upgrade to that intentionally.

Copy link
Member

Choose a reason for hiding this comment

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

Got it! But doesn't that mean they won't notice issues in CI or locally? If 8.1.0 releases something that ends up affecting the addon (which we know can happen), then they won't know. This would make more sense if we set up a nightly CI check that uses npx storybook@latest upgrade and then runs yarn build and optionally yarn test-storybook

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I see what you mean, it would be ideal to support "both", I don't feel like adding that CI workflow now, since I don't think it's that simple to test an addon, given they are often manager functionality which can't be represented in a story.

I'd rather optimize for addons to support a whole major range, than I'd optimize for addons to catch bugs/regression we introduce in a Storybook minor release.

package.json Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@JReinhold JReinhold merged commit 9955a2a into main Mar 18, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants