7 ms·
I find it strange that the time isn't invested in already existing projects. But at least it's a move away from NPM. I think the most problems I had with JavaS
by k__ 10y ago
I find it strange that the time isn't invested in already existing projects.
But at least it's a move away from NPM. I think the most problems I had with JavaScript develompent in the last 2 years came from NPM.
- tranvu 10y agoYarn isn't a replacement for npm itself. It's a client that can read/write to npm, and other registries such as Bower.
- thoughtpalette 10y agoWell, it seems like it could be according to the article. What would you still need to use NPM (the cli) for, other than package hosting? According to http://blog.npmjs.org/post/151660845210/hello-yarn http://blog.npmjs.org/post/151660845210/hello-yarn, it seems it doesn't work with private packages yet, which may or may not be an issue for your project. But it seems this is a complete CLI replacement for NPM.
- wtetzner 10y agoYes, it replaces the client, but it uses the same package repository and package format.
- dacjames 10y agoAnd thus could have been implemented as part of the existing client.
- wtetzner 10y ago"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 having a really hard time understanding the complaint about a new client. The value is in repository of reusable code, not the client. That you can use different clients with the same repository is a feature, not a bug.
- hal9zillion 10y agoYeah - the npm client codebase would not be fun to do a big refactor on. And you would need to do a big refactor to make the v3 flat install process deterministic and/or performant. 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.
- rubber_duck 10y agonpm = node package manager = CLI tool which Yarn replaces. npmjs.com = package repo which Yarn can use. at least as far as I can tell
- EugeneOZ 10y agoI'm almost sure complain was about npm as a tool, not about repo :)
- cygned 10y agoWould you mind going a bit into detail? I work with npm on a daily basis and I am pretty happy so far.
- k__ 10y agoThe whole version range stuff got me many times. I went to use fixed versions on my own package.json files, but the deps of my deps could still be dynamic, which is even worse, since they sit deeper in my dependency graph AND there are more indirect deps than direct deps. (~50 direct, >200 indirect) Also, npm isn't deterministic and it got even worse with v3. Sometimes you get a flat list of libs, if a lib is used with multiple versions, the first usage will get installed flat, the rest in the directory of the parent lib, etc. The npm-cli is basically a mess :\
- rubber_duck 10y agoThe fun of kicking off a CI build after the weekend with no commits and see stuff randomly break because some dependency of a dependency got updated and broke things in a minor version is something I've only experienced in JS - beautiful.
- markus2012 10y agoWell, now you can do that in Cargo as well :-) What we do currently is we lock everything to an explicit version - even libraries. At least it's possible to get deterministic builds if you are willing to do a bit of work carefully / manually updating all of your dependencies at once.
- steveklabnik 10y agoYou shouldn't have that happen with Cargo, given that we have a lockfile. Even when you specify version ranges, you're locked to a single, specific version.
- markus2012 10y ago