Earlier quoted context omitted.
Explain why duplication is mandatory?
Just imagine two packages you depend on (a and b) that both have a shared dependency (x). Both start off depending on x version 1.0 but then later a is updated to 2.0 while b isn't. Now you have two packages depending on different versions of the same package and hence the need for duplication. You have a that needs x@2.0 and b that needs x@1.0, so both copies are kept.
Yarn – A new package manager for JavaScript
461–470 of 486 posts
Re: Yarn – A new package manager for JavaScript
#462Earlier quoted context omitted.
Is npm the bazooka or C++? As someone who's worked with C/C++ (and its hilarious explosion of tooling -- half-a-dozen at Google alone), maven, bundler and Cargo, I think it's just not accurate to say that the npm ecosystem has a particularly high level of complexity.
npm is the bazooka. Covers a lot more area with a single tool, but sometimes dangerous if you use it wrong. C/C++ tooling is a plastic butterknife you get with airplane food.
Re: Yarn – A new package manager for JavaScript
#463Re: Yarn – A new package manager for JavaScript
#464So how do you install packages like `npm install` without adding it to the package.json file?
This kind of liberty is the sort of stuff npm was designed for. It is also why npm has been causing trouble in many cases.
Re: Yarn – A new package manager for JavaScript
#465So how do you install packages like `npm install` without adding it to the package.json file?
You don't. If you want to be able to do stuff like that (and inevitably run into "hmm, works on my machine"-type bugs once you start sharing your code with others), you need to keep using npm. This kind of liberty is the sort of stuff npm was designed for. It is also why npm has been causing trouble in many cases.
There are many use cases for this functionality, the design of a software package shouldn't instill dogma into its users. Users use software for their needs, not to sign up to a religion.
Re: Yarn – A new package manager for JavaScript
#466Re: Yarn – A new package manager for JavaScript
#467Earlier quoted context omitted.
And thus could have been implemented as part of the existing client.
" Could have been implemented as part of the existing client" isn't the same as " Should have been implemented as part of the existing client". I personally don't know much about either tool (don't do a ton of JS), but it's possible that fixing the existing client without either breaking backward compatibility or making it too complicated (multiple modes of operation) was too difficult or not worth it. Also, I'm havi…
These issues have been raised a few times, along with the shrinkwrap/reproducability stuff, and it didnt seem like it was a big priority for the core team. Understandably I guess they seem more focussed on the enterprise/private repo side of things and just keeping things running on the client side.
Re: Yarn – A new package manager for JavaScript
#468Earlier quoted context omitted.
Is npm the bazooka or C++? As someone who's worked with C/C++ (and its hilarious explosion of tooling -- half-a-dozen at Google alone), maven, bundler and Cargo, I think it's just not accurate to say that the npm ecosystem has a particularly high level of complexity.
npm is the bazooka. Covers a lot more area with a single tool, but sometimes dangerous if you use it wrong. C/C++ tooling is a plastic butterknife you get with airplane food.
Re: Yarn – A new package manager for JavaScript
#469But that would be too easy...
Re: Yarn – A new package manager for JavaScript
#470Or just use shrinkpack: https://github.com/JamieMason/shrinkpack But that would be too easy...