YahooArchive / fluxible-router

MOVED TO FLUXIBLE REPO
104 stars 26 forks source link

fluxible should be a peer dependency #40

Closed lo1tuma closed 9 years ago

lo1tuma commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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 commented 9 years ago

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

lo1tuma commented 9 years ago

Awesome, thanks :+1:.

mridgway commented 9 years ago

Changed in v0.1.8.