Skip to content
This repository has been archived by the owner on Jul 15, 2019. It is now read-only.

fluxible should be a peer dependency #40

Closed
lo1tuma opened this issue Jun 1, 2015 · 5 comments
Closed

fluxible should be a peer dependency #40

lo1tuma opened this issue Jun 1, 2015 · 5 comments

Comments

@lo1tuma
Copy link

lo1tuma commented Jun 1, 2015

Currently fluxible is a normal dependency of fluxible-router. As you can see in the flux-examples this can be problem causing two different versions of fluxible in your bundled javascript file.

@mridgway
Copy link
Collaborator

mridgway commented Jun 1, 2015

Typically npm will hoist the dependency if the versions are the same and only install in the root folder that has the fluxible dependency. Are you seeing it installed twice somewhere?

@lo1tuma
Copy link
Author

lo1tuma commented Jun 1, 2015

The problem with that is that you always have to know which version of fluxible is used by fluxible-router and keep them in sync. Using a peerDependency would show you warning during npm install if the version doesn’t match with the version defined in fluxible-router.

In my case I always use exact version numbers in my package.json, so if I depend on fluxible 0.4.8 and fluxible-router depends on ^0.4.9 I will end up with two versions of fluxible.

@mridgway
Copy link
Collaborator

mridgway commented Jun 1, 2015

Fair point about the warning. We will make that change.

@lo1tuma
Copy link
Author

lo1tuma commented Jun 2, 2015

Awesome, thanks 👍.

mridgway added a commit that referenced this issue Jun 2, 2015
[resolves #40] Move fluxible to peer dependencies
@mridgway
Copy link
Collaborator

mridgway commented Jun 2, 2015

Changed in v0.1.8.

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

No branches or pull requests

2 participants