-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
CSF-Factories: Export WebComponentsTypes and VueTypes #33521
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
When using CSF factories with `meta.story()`, the return type references `WebComponentsTypes` and `VueTypes` constraints, but these types were not exported from the package's public API, causing TS4023 errors: "Exported variable 'Default' has or is using name 'WebComponentsTypes'" This follows the existing pattern from @storybook/react which already exports `ReactTypes`. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
📝 WalkthroughWalkthroughTwo renderer package index files now publicly re-export their respective types. Vue3 renderer exports Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (4)**/*.{js,jsx,ts,tsx,json,md,html,css,scss}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{js,jsx,json,html,ts,tsx,mjs}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧠 Learnings (4)📓 Common learnings📚 Learning: 2025-12-22T22:03:40.123ZApplied to files:
📚 Learning: 2025-12-22T22:03:40.123ZApplied to files:
📚 Learning: 2025-09-24T09:39:39.233ZApplied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (2)
Comment |
|
View your CI Pipeline Execution ↗ for commit 610a629
☁️ Nx Cloud last updated this comment at |
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 49 | 49 | 0 |
| Self size | 20.30 MB | 20.27 MB | 🎉 -26 KB 🎉 |
| Dependency size | 16.52 MB | 16.52 MB | 0 B |
| Bundle Size Analyzer | Link | Link |
@storybook/cli
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 183 | 183 | 0 |
| Self size | 775 KB | 775 KB | 0 B |
| Dependency size | 67.38 MB | 67.35 MB | 🎉 -26 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/codemod
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 176 | 176 | 0 |
| Self size | 30 KB | 30 KB | 0 B |
| Dependency size | 65.95 MB | 65.92 MB | 🎉 -26 KB 🎉 |
| Bundle Size Analyzer | Link | Link |
create-storybook
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 50 | 50 | 0 |
| Self size | 999 KB | 999 KB | 🎉 -42 B 🎉 |
| Dependency size | 36.82 MB | 36.79 MB | 🎉 -26 KB 🎉 |
| Bundle Size Analyzer | node | node |
Closes #
What I did
Export
WebComponentsTypesfrom@storybook/web-componentsandVueTypesfrom@storybook/vue3.When using CSF factories with
meta.story(), the return type references these type constraints, but they were not exported from the package's public API, causing TS4023 errors:This follows the existing pattern from
@storybook/reactwhich already exportsReactTypes(added in #30601).Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This is a TypeScript types-only change. To test:
@storybook/web-componentsor@storybook/vue3with CSF factoriesmeta.story()no longer produces TS4023 errors about unexported typesDocumentation
MIGRATION.MD
No documentation changes needed - this is a bugfix for missing type exports.
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This pull request has been released as version
0.0.0-pr-33521-sha-610a6294. Try it out in a new sandbox by runningnpx storybook@0.0.0-pr-33521-sha-610a6294 sandboxor in an existing project withnpx storybook@0.0.0-pr-33521-sha-610a6294 upgrade.More information
0.0.0-pr-33521-sha-610a6294kasper/fix-ts4023-types-export610a62941768299083)To request a new release of this pull request, mention the
@storybookjs/coreteam.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=33521