Re:Yarn – A new package manager for JavaScript
by ksherlock on Tuesday October 11, 2016 @11:52AM
(#12685527)
It's improved but it's not fixed. if a depends on c 1.0 and b depend on c 2.0, both versions of c need to be installed and one of them will be nested.
[ Parent
| on HN ]
Re:Yarn – A new package manager for JavaScript
by l1ambda on Tuesday October 11, 2016 @05:47PM
(#12688791)
...which is actually good. With Java and maven, you cannot use multiple versions of a library.
Re:Yarn – A new package manager for JavaScript
by Kenan on Tuesday October 11, 2016 @02:16PM
(#12687035)
What's the solution for that case though (one which requires no nesting)? I don't think a solution with no nesting exists given the current module resolution algorithm of Node.js, which allows for only a single version of a particular package to exist at a given level.
Re:Yarn – A new package manager for JavaScript
by ksherlock on Tuesday October 11, 2016 @02:44PM
(#12687351)
nesting can't be prevented in that case (at least with the current node require() design). It gets really bad if you have 10 packages that depend on [email protected] and 10 packages that depend on [email protected] -- one of them will install in the root directory and the other 10 will be duplicated. ied stores a single copy of each package@version and uses symlinks which is an improvement. Apparently yarn tried something similar but it breaks some packages (that check where they're located for example).
Re:Yarn – A new package manager for JavaScript
by Osiris on Tuesday October 11, 2016 @04:25PM
(#12688218)
I could be prevented. Another project does this by using a hash of the project to all all dependencies at one level then symlinks the dependencies from hash to name so it references the correct version.