atanasster / storybook-addon-deps

A storybook addon to add a dependencies tree exporer tab.
https://atanasster.github.io/storybook-addon-deps/?path=/docs/design-system-avatarlist--short
MIT License
59 stars 3 forks source link

Compatability with Storybook 6 #8

Closed houfio closed 4 years ago

houfio commented 4 years ago

Since alpha 15 of Storybook 6 the plugin fails to initialize due to an error on this line.

This is the error:

Cannot read property 'parameters' of null
TypeError: Cannot read property 'parameters' of null
    at http://localhost:8000/vendors~main.ddcfb952246300a85a56.bundle.js:178543:55
    at Array.find (<anonymous>)
    at http://localhost:8000/vendors~main.ddcfb952246300a85a56.bundle.js:178542:39
    at Array.map (<anonymous>)
    at mapModuleToStory (http://localhost:8000/vendors~main.ddcfb952246300a85a56.bundle.js:178539:30)
    at getDependenciesProps (http://localhost:8000/vendors~main.ddcfb952246300a85a56.bundle.js:178598:15)
    at http://localhost:8000/vendors~main.ddcfb952246300a85a56.bundle.js:178111:107
    at updateContextConsumer (http://localhost:8000/vendors~main.ddcfb952246300a85a56.bundle.js:143422:19)
    at beginWork$1 (http://localhost:8000/vendors~main.ddcfb952246300a85a56.bundle.js:143805:14)
    at HTMLUnknownElement.callCallback (http://localhost:8000/vendors~main.ddcfb952246300a85a56.bundle.js:123914:14)

The devs of Storybook have written up a nice document explaining what's changed here.

(and what's up with v1.0.12? It's up on npm, but the repo is still on v1.0.11 ;))

atanasster commented 4 years ago

@houfio thanks for the report, 0.11 was just released yesterday and i now pushed to github.

As for the sb alphas, i haven't checked for now and cant confirm if it breaks my addon - probbaly when 6.0 enters into beta if it still breaks existing addons i will look for a solution.

atanasster commented 4 years ago

Ill close this for now - while storybook 6.0 is in alpha best to report to them any incompatibility issues, it might be inadvertently introduced. If still an issue when 6.0 enters beta, please open a new issue.

houfio commented 4 years ago

Since they've put it in their migration guide I'm sure the change is there to stay. I'll lock my Storybook versions for now and hope they get to beta soon. Thanks for all your work!

atanasster commented 4 years ago

Thanks for understanding. Yeah its bit meaningless to chase changes in alphas, got to give them the space to reverse decisions etc. and lets see what happens in the betas.

puyt commented 4 years ago

Storybook 6 is out of beta, any idea when it's gonna be supported? Thanks in advance!

https://github.com/storybookjs/storybook/releases

atanasster commented 4 years ago

Thanks for the heads up, i will give it a try over the week end.

At some point i did make the addon compatible with 6beta, have you given it a try with the 6.xx updates? It might work, but they also broke compatibility multiple times with 6 so i wouldn't be surprised if i need to adjust it again.

puyt commented 4 years ago

@atanasster Great!

I've tested it with the latest release and I get the following error because they've renamed PropsTable to ArgsTable, not sure if they're any other issues.

image

atanasster commented 4 years ago

Great thx a lot - if you want to submit a pr or i will get to it over the week end

atanasster commented 4 years ago

Just released 2.1.0 dealing with sb6 later stage incompatibilities introduced during the rc period.

If you find any issues, please create a new issue.