Live data from Hacker News

Yarn – A new package manager for JavaScript

code.facebook.com

331–340 of 486 posts

Re: Yarn – A new package manager for JavaScript

#331

Earlier quoted context omitted.

Is requiring Node really that bad? I don't write Bash or Ruby or Python or Go, but I have them all installed because various tools need them.

It doesn't make sense to require a backend tool for frontend technologies. That's just me though. So that's why I'm asking. Couldn't they just create a package system that's not based on some backend tech?

I guess I don't understand. How would you fetch/build/etc frontend JS files without some sort of backend technology?

(Also don't forget that frontend JS has to target dozens of subtly different browsers, so we unfortunately need to "build" JS files to account for backwards compatibility, etc)

Re: Yarn – A new package manager for JavaScript

#332
post #39

Earlier quoted context omitted.

There has been no problems with folder nesting in `npm` in general since the version@3 came out over a year ago.

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.

...which is actually good. With Java and maven, you cannot use multiple versions of a library.

Re: Yarn – A new package manager for JavaScript

#333
post #126

Earlier quoted context omitted.

You say "decent performance" and "predictability". What is the basis of this claim? I've heard these all before, but unless you've actually shipped a product using this tool I don't know how you can back this up.

> unless you've actually shipped a product using this tool Given that wycats _worked on_ this tool, I would assume it's his experience helping build it that's the basis of the claim. (I don't work at Tilde so I can't tell you if it's been shipping with yarn, but it would shock me if it wasn't.)

Ok, didn't realize he worked on it. Bundler is great so that gives me some hope for Yarn. But in general I think its more stable in the long-term for projects to use open standards instead of vendor solutions for browser package management.

Re: Yarn – A new package manager for JavaScript

#335
post #39

Earlier quoted context omitted.

There has been no problems with folder nesting in `npm` in general since the version@3 came out over a year ago.

> no problems Absolute and utter hogwash. I don't even need to get into versioning to make this argument but I'll exclude it for clarity's sake. Simple scenario: root -> A root -> B root -> C A -> B B -> C What folder structure is created? root/node_modules/A/node_modules/B/node_modules/C root/node_modules/B/node_modules/C root/node_modules/C Symlink that all you want, how is it in any way whatsoever thoughtful and e…

what you described is npm@2's behaviour. npm@3 will flatten dependencies as much as possible

Re: Yarn – A new package manager for JavaScript

#336
post #179

Earlier quoted context omitted.

The 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.

With or without npm-shrinkwrap.json? Not chastising, I'm sincerely asking.

Obviously without until we broke and looked in to it :D

JS dev has been a minefield like that, the entire ecosystem reminds me of C++ except lower barrier to entry means a lot of noise from newbies on all channels (eg. even popular packages can be utter crap so you can't use popularity as a meaningful metric)

Re: Yarn – A new package manager for JavaScript

#338
post #335

Earlier quoted context omitted.

> no problems Absolute and utter hogwash. I don't even need to get into versioning to make this argument but I'll exclude it for clarity's sake. Simple scenario: root -> A root -> B root -> C A -> B B -> C What folder structure is created? root/node_modules/A/node_modules/B/node_modules/C root/node_modules/B/node_modules/C root/node_modules/C Symlink that all you want, how is it in any way whatsoever thoughtful and e…

what you described is npm@2's behaviour. npm@3 will flatten dependencies as much as possible

How does it flatten dependencies? Symlinks?

Re: Yarn – A new package manager for JavaScript

#339

Earlier quoted context omitted.

Do you mean import '/web/X'? Import URLs have to start with a `/`, `./`, or `//`. Even so, that requires a build tool. I want to be able to load working sources directly out of my packages directory.

> Do you mean import '/web/X'? Not if you use a build tool for your frontend. > Even so, that requires a build tool. That was basically what I was suggesting. I'm not sure what the other option really is. If you're working within the browser (implied by this being a frontend), then you have to use a build tool since javascript modules/imports haven't landed in any browser yet.

> If you're working within the browser (implied by this being a frontend), then you have to use a build tool since javascript modules/imports haven't landed in any browser yet.

For now, but native JS module loading is right around the corner, and at that point I don't want to have a required tool to load my modules.

Currently I use HTML Imports, which don't require tools because they use relative URLs. It works really well, so I hope to use that pattern with JS modules.

Re: Yarn – A new package manager for JavaScript

#340

Earlier quoted context omitted.

Why is that? In the Java ecosystem there is Spock framework that gives you everything required for testing, you don't even need junit+mockito. In which scenario would be better to use 11 different libraries for doing the same thing as a well written framework?

In this case, I would argue it is not better. Many JS devs have moved onto simpler, greener pastures. https://github.com/substack/tape is what I prefer. Small little library. Its API has everything I need and nothing I don't. Those other test libraries listed are pretty much overkill. Similar with http://mithril.js.org/ over React, Angular and Ember. A single drop-in library with 13 functions in it's API. The library…

From the readme I can't really see how to write extensive unit tests with that thing.. If I need to test something I want only one tool that works perfectly and does all the Stubbing, Mocking, verification, data driven test and behaviour driven test. I still haven't found in any language/ecosystem anything comparable to Spock in completeness, readability and ease of use. Honestly I can't really see how to do BDD with tape.
Post reply on HN