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

Move immutable and seamless-immutable to peer dependencies #390

Merged
merged 1 commit into from
Jan 29, 2020
Merged

Move immutable and seamless-immutable to peer dependencies #390

merged 1 commit into from
Jan 29, 2020

Conversation

maxmalov
Copy link
Contributor

The original discussion: #296

Currently, I use connected-react-router, redux-form and the project doesn't depend on immutable at all. But it seems like redux-form is pretty eager for immutable library and if it presents inside node_modules it will be included in the bundle, which is pretty confusing. I'm not sure what was the purpose to include immutable and seamless-immutable in the library dependencies (keeping in mind that redux and react-router related stuff lives in peerDependencies), so these are breaking changes. Anyway everyone who wants immutable or seamless-immutable version of this package already has these packages installed, so it won't be a big issue for them to migrate.

@supasate
Copy link
Owner

LGTM. Thanks!

@supasate supasate merged commit f5c6042 into supasate:master Jan 29, 2020
supasate added a commit that referenced this pull request Feb 9, 2020
* 'master' of github.com:supasate/connected-react-router:
  Bump handlebars from 4.1.2 to 4.5.3 (#385)
  Bump handlebars from 4.2.0 to 4.5.3 in /examples/react-native (#386)
  Move immutable and seamless-immutable to peer dependencies (#390)
  Include location state in LOCATION_CHANGE payload (#302)
  Implement: Windows development capability (#378)
@ascartabelli
Copy link

ascartabelli commented Feb 13, 2020

Just curious: shouldn't optionalDependencies be a more suitable place than peerDependencies for those?

@maxmalov
Copy link
Contributor Author

Optional dependencies work when the code handles cases when they are not installed https://npm.github.io/using-pkgs-docs/package-json/types/optionaldependencies.html, which can't be applied to connected-react-router/immutable and connected-react-router/seamless-immutable

@ascartabelli
Copy link

@maxmalov Sorry for the very late answer and yes, I do understand your reasoning. Still connected-react-router/immutable and connected-react-router/seamless-immutable are just an option, not the "default" exports.
My little pet peeve, here, is that if every library adopted your reasoning we would end with endless, and useless, warnings in the console while using npm.

@Methuselah96
Copy link

It seems like that connected-react-router/immutable and connected-react-router/seamless-immutable should be release as separate packages in order to accurately represent their dependencies.

@supasate Has there been any thought of releasing them as separate packages?

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

Successfully merging this pull request may close these issues.

4 participants