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

Breaking change in @storybook/router from 6.3.x to 6.4.x #16936

Closed
floyd-may opened this issue Dec 7, 2021 · 3 comments
Closed

Breaking change in @storybook/router from 6.3.x to 6.4.x #16936

floyd-may opened this issue Dec 7, 2021 · 3 comments

Comments

@floyd-may
Copy link

Describe the bug
Version 6.3.x of @storybook/router depends on react-router-dom version 5.x. However, version 6.4.x depends on react-router-dom at version 6, causing version conflicts. Therefore the default behavior of installing via semver-compatible specification introduces breaking changes from 6.3.x to 6.4.x.

For instance, my app uses react-router-dom at version 5.x. Upgrading @storybook/router from 6.3.x to 6.4.x installs react-router-dom at 6.x, causing two copies of it in my dependency tree. Then, my stories break, since react-router-dom 5.x to 6.x introduces breaking changes (as is allowed in major upgrades).

This seems like something that may be better handled via peerDependencies than a direct dependency possibly? That way you create the option to allow either version of react-router-dom.

@shilman
Copy link
Member

shilman commented Dec 7, 2021

closing as dupe to #16837

@floyd-may
Copy link
Author

@shilman apologies for the dupe, I didn't see it in my search before making a new issue.

@shilman
Copy link
Member

shilman commented Dec 7, 2021

@floyd-may no worries -- probably because it was closed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants