jesse1983 / marko-router5

Flexible and powerful routing for MarkoJS
https://jesse1983.github.io/marko-router5
MIT License
29 stars 4 forks source link

marko 4.12 as dependency causes clashes with later versions used from client. #5

Closed hedefalk closed 6 years ago

hedefalk commented 6 years ago

Ok, one of the issues from #4 is probably just that Marko 4.12 clashes with 4.13 that I'm using. this project has marko 4.12 as a dependency, not devDependency or peerDependency. This is most likely incorrect?

If I understand I think the whole dist stuff isn't needed here? It's just source of the node_module exposed via marko.json right so my webpack would work fine without you having a dependency on marko at all, so I think dev dependency is the right thing to do?

hedefalk commented 6 years ago

Turns out all my weird issues on #4 was due to clashing Marko versions or so it seems. I just used resolutions in package.json with yarn and I'm happy go lucky:

"resolutions": {
    "marko": "4.13.4-1"
  }

However, is it really a good idea to bundle a marko version with this package as a straight runtime dependency?

jesse1983 commented 6 years ago

Hi @hedefalk . I updated marko version to 4.13.5. Can you test it?

hedefalk commented 6 years ago

@jesse1983 It will most likely work if I use that version, but do you really need to bundle marko as a dependency? If marko have runtime-issues if I'm mixing versions, I'd need the version in marko-router5 to match the version I depend on myself at all times - might be unnecessarily complex?

I could handle the problem by adding a resolutions rule in my package dom to override any transitive deps…

hedefalk commented 6 years ago

I had another issue similar to this:

https://github.com/marko-js/marko/issues/1167?fbclid=IwAR24wESBjA6Iwzua6s9P2YgVe1tOzWRDGy5jftssoOt6NK22KnM8p9Yjj-I

and I'm thinking bundling marko as a peer dependency makes sense here?