I made a fork of flow router and now I would like that Meteor uses that in my app for all dependencies of all packages I am using, which depend on kadira:flow-router. But even if I have api.imply('kadira:flow-router@2.10.0') in my package.js Meteor still loads kadira:flow-router as a dependency. The consequence is that I have now two routers in the app but routes are registered to only one, so I am getting errors like There is no route for the path: /.
It seems that the only way to go around this is to put a package inside packages directory. But this is exactly what I wanted to avoid by publishing my own fork of the package.
So, why doesn’t imply work and make it replace the dependency everywhere?
I take a different approach. I fork the package to put it in my packages directory, don’t change the name, just increment the semver version number with _1 and then pin that version down as a dependency.
That way, the app does not check package server for that dependency. And any other package that depends on it out of my control also get to use my version.
Agreed, I don’t like submodules either. In fact when I fork a package, I delete anything git related in it so it is tracked directly from within my repository.