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

[Tracking]: Core Consolidation & Internal API Reorganization #30674

Open
6 of 35 tasks
valentinpalkovic opened this issue Feb 26, 2025 · 0 comments
Open
6 of 35 tasks

[Tracking]: Core Consolidation & Internal API Reorganization #30674

valentinpalkovic opened this issue Feb 26, 2025 · 0 comments
Assignees
Labels
Milestone

Comments

@valentinpalkovic
Copy link
Contributor

valentinpalkovic commented Feb 26, 2025

This milestone aims to finalize the consolidation of core packages, streamline API exposure, and remove unnecessary dependencies to reduce bloat and improve maintainability. The work will impact both internal and public APIs, requiring migration strategies and automations for a smooth transition.

Items:

1. Finalize Core Package Consolidation

  • Remove deprecated shim packages
    • Make CI green
      • Update satellite packages
    • Remove each deprecated package and update imports (migrate imports to storybook/internal/* as needed)
    • Remove renderer dependencies on these packages (update renderer packages to stop using shims)
    • Adjust or remove missingStorybookDependencies automigration
      • Update or delete the automigration that adds missing Storybook deps, since shim packages are being removed
      • Ensure this does not interfere with new automigrations for deprecated packages
    • Write a new automigration to detect & flag removed package usage
      • Implement a script that scans a project’s dependencies for any of the removed shim packages
      • If found, adjust imports to storybook/internal
    • Validate and test all automigration scripts
      • Run the automigrations on sample v8 projects that use deprecated packages to ensure they correctly update to v9 structure
    • Write a migration note for how to migrate from shim to core manually
  • Merge @storybook/core into storybook (see PR)
    • Review the existing PR and apply any necessary updates
    • Ensure no satellite projects are still directly using @storybook/core (find and update any such usages)
    • Update documentation and migration notes accordingly

2. Re-export APIs from Renderers to Frameworks

  • Re-export renderer APIs in framework packages (e.g., export @storybook/react APIs from @storybook/react-vite)
    • Assess all existing frameworks (approximately 19) and determine needed re-exports for each
    • Implement re-export of each renderer’s public API in its corresponding framework package
    • Create an automigration script to update user imports (replace direct renderer imports with framework package imports) and remove direct renderer dependencies in user projects
  • Update documentation and migration guides
    • Add clear migration notes for users and addon authors
    • Document the new import patterns (@jonniebigodes)
  • Modify new project initialization
    • Update the CLI init templates so that frameworks (e.g., react-vite) are added without separate renderer packages
      • Discuss how to approach this (stories-per-framework vs template-renderer-stories-modified-for-each-framework)
  • Update our Eslint plugin
    • Update the plugin to make sure that the user only imports from the framework packages
  • Update Addon Kit to remove references to @storybook/react

3. Remove Compatibility Aliases & Reduce Dependencies

  • Remove util, process, and browser-assert dependencies from Storybook’s client
    • Refactor or replace usage of each (util, process, browser-assert) to eliminate the dependency
    • Verify that removing util significantly reduces bundle size (it currently contributes a large portion of dependencies​
    • Update migration documentation to guide addon developers who might be using these packages in the manager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants