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

CLI: check for missing/unneeded deps when initializing SB in a project #10798

Closed
3 tasks
gaetanmaisse opened this issue May 15, 2020 · 6 comments
Closed
3 tasks
Labels
cli maintenance User-facing maintenance tasks

Comments

@gaetanmaisse
Copy link
Member

Work summary

When using CLI to initialize Storybook in a project some dependencies are added (according to the framework) to have everything working out of the box. For instance, for a CRA project the following dependencies are added:

  • @storybook/react
  • @storybook/preset-create-react-app
  • @storybook/addon-actions
  • @storybook/addon-links
  • @storybook/addons

To offer the best UX, make a good impression and so improve Storybook adoption we need to be sure that all added dependencies are necessary and that there is no missing dependency or peer dependency.

This work is part of #10723

Where to start

🔍 Run E2E tests locally and check all dependency warnings returned by NPM or Yarn.

➕ Add the dependencies that are reported as missing by the package manager OR the origin of this warning and make sure that this is not due to missing or unneeded dependencies in @storybook packages.

🗑️ Remove potentially unneeded dependencies and check that everything is still ok (for instance, @storybook/addons looks to be a dependency of each addon so no need to add it one more time via the project dependencies)

Note: Yarn 2 can help with that because it is way more strict on missing dependencies than NPM or Yarn 1.

Acceptance criteria

  • E2E tests are passing
  • Changes are properly reviewed by some of the members mentioned below
  • 🤷 Not sure how we can test that we are only adding needed dependencies

Who to contact

@gaetanmaisse @ndelangen @tooppaaa @yannbf

@gaetanmaisse gaetanmaisse added maintenance User-facing maintenance tasks cli labels May 15, 2020
@yannbf yannbf mentioned this issue May 19, 2020
2 tasks
@stale stale bot added the inactive label Jun 5, 2020
@gaetanmaisse
Copy link
Member Author

gaetanmaisse commented Jun 5, 2020

Don't worry stale we will do it ;)

@storybookjs storybookjs deleted a comment from stale bot Jun 8, 2020
@stale stale bot added the inactive label Jul 3, 2020
@gaetanmaisse
Copy link
Member Author

I will work on it after #10797

@stale stale bot removed the inactive label Jul 3, 2020
@storybookjs storybookjs deleted a comment from stale bot Jul 3, 2020
@shilman
Copy link
Member

shilman commented Jul 3, 2020

Related (but different): #11396

@stale
Copy link

stale bot commented Jul 25, 2020

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@stale stale bot added the inactive label Jul 25, 2020
@shilman shilman added the todo label Aug 9, 2020
@stale stale bot removed the inactive label Aug 9, 2020
@shilman shilman added this to the 6.1 essentials milestone Aug 9, 2020
@yannbf
Copy link
Member

yannbf commented Aug 20, 2020

Hey @gaetanmaisse, shall we check about the state of this again, given that quite some things changed and the addons that come via the CLI templates are now a bit different?

@gaetanmaisse
Copy link
Member Author

gaetanmaisse commented Aug 26, 2020

🤔 True! We should take a deep look at all packages' deps and devDeps but it's not directly related to the CLI anymore.

@gaetanmaisse gaetanmaisse removed this from the 6.2 essentials milestone Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli maintenance User-facing maintenance tasks
Projects
None yet
Development

No branches or pull requests

3 participants