Live data from Hacker News

Yarn – A new package manager for JavaScript

code.facebook.com

51–60 of 486 posts

Re: Yarn – A new package manager for JavaScript

#51
post #20

It looks like this addresses the biggest issues people have with npm's CLI, and it's coming from such huge names: Facebook, Google, and Tilde. Reproducible builds are a _huge_ issue, and this gives you that. Looks great! One interesting little tidbit I found from diving into the source: https://github.com/yarnpkg/yarn/blob/master/src/constants.js#L15 https://github.com/yarnpkg/yarn/blob/master/src/registries/yarn-reg…

It's not the first one addressing these problems. Nix and ied (which borrowed from Nix) got these problems pretty much solved. I don't understand what spoke against these approaches? I mean okay, nix has its own language, which is probably a turnoff for JS devs, but ied?

[deleted]

Re: Yarn – A new package manager for JavaScript

#52
post #27
post #22

This is a huge leap forward for the JavaScript community—probably more than many people will realize right away. I loved Bundler's deterministic builds but chafed against the Ruby limitation of only having a single version of a dependency at once. npm solved this problem elegantly, but still struggles with non-determinism. I had resigned myself to thinking that maybe these were just fundamental tradeoffs in package m…

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.

Yarn isn't a replacement for npm itself. It's a client that can read/write to npm, and other registries such as Bower.

Re: Yarn – A new package manager for JavaScript

#55
post #41

Yarn is currently being powered by a service running at https://registry.yarnpkg.com - at least that's what's referenced in the yarn.lock file that's created. I see no documentation nor code for the service powering this, nor is there a way to tell the command line tool to use a registry at a different address. Aren't we just replacing the dependency on npm, Inc.'s registry with a new dependency on Facebook Inc's reg…

[deleted]

Re: Yarn – A new package manager for JavaScript

#56
post #41

Yarn is currently being powered by a service running at https://registry.yarnpkg.com - at least that's what's referenced in the yarn.lock file that's created. I see no documentation nor code for the service powering this, nor is there a way to tell the command line tool to use a registry at a different address. Aren't we just replacing the dependency on npm, Inc.'s registry with a new dependency on Facebook Inc's reg…

that registry is a mirror of npm's registry. the mirror contains all package data but does not include any of the permissions or user management, so this tool still depends on npm infra for both that, and as a replication source.

Re: Yarn – A new package manager for JavaScript

#58
post #22

This is a huge leap forward for the JavaScript community—probably more than many people will realize right away. I loved Bundler's deterministic builds but chafed against the Ruby limitation of only having a single version of a dependency at once. npm solved this problem elegantly, but still struggles with non-determinism. I had resigned myself to thinking that maybe these were just fundamental tradeoffs in package m…

Multiple versions may sound like it's useful, but it's almost always a bad idea. Cargo doesn't allow it either. The problem isn't really fundamental. Bundler makes almost all the right choices already. Its major disadvantage is that it only works for Ruby.

Cargo definitely allows two dependencies to rely on different versions of a transitive dependency. If those deps expose a type from that dependency in their API, you can very occasionally get weird type errors because the "same" type comes from two different libraries. But otherwise it Just Works(tm).

Re: Yarn – A new package manager for JavaScript

#59

I think the write-up should specify `npm install -g yarnpkg` not `npm install -g yarn`.

The recommended installation method is actually to use the package/installer for your environment. Currently there's a Windows installer, Debian package, and RPM package, with Homebrew coming soon. See https://yarnpkg.com/en/docs/install

Re: Yarn – A new package manager for JavaScript

#60
post #9

> Yarn, a collaboration with Exponent, Google, and Tilde. They should mention this at the very beginning. Multiple big players investing in this package manager means that we should maybe inspect a little bit more before chanting xkcd.com/927.

That deprives me of the fun of downvoting people mindlessly misusing xkcd.com/927.
Post reply on HN