-
Notifications
You must be signed in to change notification settings - Fork 780
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
merge features from virtual-hyperscript #114
Conversation
Rather then copying and pasting the source code of Alternatively having another copy of vtree instead would be preferable over copy pasted code. If you really do want to copy paste, consider using a git submodule or something. |
Copying and pasting? Submodules? Ugh. If |
...and I'm catching up with the last year of hate on peerDependencies (npm/npm#5080). If we're tempted in that direction is that a sign that we could be handling things better? Do |
@gsf peer dependencies are the wrong thing. There are complex dependencies on the data structures in vtree. We just have to manage the versions and not fuck it up. That's what we get for having complicated data structures. Also the fact that there are tests in |
@Raynos Agreed on all points (especially moving tests out of virtual-dom). |
If you take mikeals suggestion, I would go around turning all of the things that depend on vtree or vdom into interfaces that allow you to initialize that dependency with a version of vtree/vdom. Note that in this case, vdom becomes I was intending for virtual-dom to be a consistent easy to use export. The MVP without causing version suffering. The tests in virtual-dom are integration tests, proving that these modules work together at these versions. The vdom and vtree modules should have separate unit tests. Technically, given the "inverted dependency" vdom has on vtree, I should be mocking the vtree dependency in the vdom tests. It's a mess, I'm open to suggestions that don't come with the caveat of version hell. Clearly what we are doing right now is bad.
^ This is bs. "We" becomes everyone who uses these modules. |
That is not mikeals suggestion. You depend on interfaces not functions. Since one of the advantages of seperate modules is less KBs in the browser, we can achieve this by just having the virtual-dom package expose multiple modules. The current situation is bad, might as well move them all back into virtual-dom. |
Well, looks like we moved everything. Also @Raynos what you depend on and how you depend on it are 2 different things. It seems Mikeal is suggesting that you depend on an interface, and the concrete implementation is supplied to that depending module instead of it providing for itself via require. |
I went to update virtual-dom to the latest version of virtual-hyperscript, but it depends on vtree. In my efforts to reduce this "yet another vtree dependency" problem, I have simply merged the changes from virtual-hyperscript into virtual-dom/h. cc @Raynos