chromaui / addon-visual-tests

Visual Tests addon for Storybook
MIT License
31 stars 2 forks source link

Rationalize SB deps #159

Closed tmeasday closed 6 months ago

tmeasday commented 7 months ago

We can't use peer deps because users won't have them in package.json. Also a lot of them were unused at this point.

📦 Published PR as canary version: 0.0.125--canary.159.2e17e61.0
:sparkles: Test out this PR locally via: ```bash npm install @chromaui/addon-visual-tests@0.0.125--canary.159.2e17e61.0 # or yarn add @chromaui/addon-visual-tests@0.0.125--canary.159.2e17e61.0 ```
tmeasday commented 6 months ago

I tested the canary with the Chromatic monorepo and it worked without issue.

tmeasday commented 6 months ago

Thanks @JReinhold. @ndelangen do you think we should be building src/index.js twice (as this setup leads to via this) given it is a preset and will only be used in node?

JReinhold commented 6 months ago

Thanks @JReinhold. @ndelangen do you think we should be building src/index.js twice (as this setup leads to via this) given it is a preset and will only be used in node?

No I don't think that's necessary, in addon-onboarding we have a fourth nodeEntries for this, which is the same as what we do throughout the monorepo as well.

I can't remember why it was left out of the addon-kit, might not have been intentional.

ndelangen commented 6 months ago

@tmeasday some day in the future we'll want storybook to be able to consume ESM preset files. (right now we don't)

So I'd argue you, can keep it like it is.

Storybook will for now just never use the index.mjs

tmeasday commented 6 months ago

Ok will keep as is for now.