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

[Bug] peer-dependencies include implicit dependencies #52

Closed
benbender opened this issue Apr 13, 2022 · 3 comments · Fixed by #63
Closed

[Bug] peer-dependencies include implicit dependencies #52

benbender opened this issue Apr 13, 2022 · 3 comments · Fixed by #63
Labels
bug Something isn't working

Comments

@benbender
Copy link

Describe the bug

This package names several internal packages of storybook as peer-dependencies. Because those packages usually aren't installed explicitly, it may throw errors in certain package-managers. Below is an example of pnpm.

I would like to see those peer-deps removed. Would this be possible or is there any reason I may have overlooked for having them in the first place?

 WARN  Issues with peer dependencies found
.
└─┬ @storybook/addon-svelte-csf
  ├── ✕ missing peer @storybook/addons@^6.4.20
  ├── ✕ missing peer @storybook/api@^6.4.20
  ├── ✕ missing peer @storybook/client-api@^6.4.20
  ├── ✕ missing peer @storybook/client-logger@^6.4.20
  ├── ✕ missing peer @storybook/components@^6.4.20
  ├── ✕ missing peer @storybook/core-events@^6.4.20
  └── ✕ missing peer @storybook/theming@^6.4.20
Peer dependencies that should be installed:
  @storybook/addons@^6.4.20         @storybook/client-api@^6.4.20     @storybook/components@^6.4.20     @storybook/theming@^6.4.20
  @storybook/api@^6.4.20            @storybook/client-logger@^6.4.20  @storybook/core-events@^6.4.20

Thanks in advance!

@benbender benbender added the bug Something isn't working label Apr 13, 2022
@j3rem1e
Copy link
Contributor

j3rem1e commented Apr 17, 2022

They come from the template used for generated this project.

@winkerVSbecks any idea why they are here ?

@winkerVSbecks
Copy link

@j3rem1e those are there to test your addon within its own repo. You can remove the ones your addon doesn't use.

The idea is that the addon relies on these dependencies to work. This dependency comes from the end user's storybook install. Hence, they are listed as peer dependencies. It's kind of like a component library listing react as a peer dependency.

@benmccann
Copy link
Contributor

@storybook/svelte is listed as a peerDependency:

"@storybook/svelte": ">=6.4.20",

I think that should be enough because it's going to end up pulling these in as dependencies:

https://github.com/storybookjs/storybook/blob/7ca3a53b9caa8374b1143d66754807273260d100/app/svelte/package.json#L48

I think we only want to force users to put @storybook/svelte in their package.json and not all of Storybook's dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants