Re:Node's nested node_modules approach is basically incompat...
by Cthulhu_ on Thursday June 19, 2014 @04:26AM
(#7915142)
This; each subproject having its own nested string of (often the same) dependencies just seems wasteful of me.
I like Maven's approach better; a centralized repository directory. In Node / NPM's case, given that each library has a simple name, I can imagine a directory structure ~/.node_modules/package/1.0.0. Severely reduces filesystem depth, and probably fixes re-downloads of the same package / versions too. Only requirements are a rewrite or update of node's require method, NPM's package install directory and maybe some more strictness about NPM releases.
Re:Node's nested node_modules approach is basically incompat...
by jonpacker on Thursday June 19, 2014 @04:54AM
(#7915250)
I disagree. I think node's approach is easily understandable, and quite robust. It's incredibly easy to dive down the dependency chain and see every package, and know exactly which one is being used where. Not something that can be said about package managers that use the flattened approach.
Re:Node's nested node_modules approach is basically incompat...
by xpaulbettsx on Thursday June 19, 2014 @03:12PM
(#7917779)
Pretty Printing the full dependency tree is a feature that could be easily added to npm itself, and in a way easier way to understand than trying to read through a directory tree
npm's strategy of nesting like that made things simpler when it was more of a new project, but it's time to come up with something more robust.