[Nix-dev] Simplify node packages?
Colin Putney
colin at wiresong.com
Wed Apr 26 21:25:06 CEST 2017
On Tue, Apr 25, 2017 at 3:21 AM, Sander van der Burg <svanderburg at gmail.com>
wrote:
Now yarn (and other approaches such as ied) do obviously a much better job
> than NPM in some aspects. Unfortunately, as of today, NPM remains the
> de-facto standard for Node.js package deployment, and I'm not sure if this
> will ever change.
>
It's changing now and quite quickly. A google search for "yarn add" on
npmjs.com yields about 5K results[2]. Here's one random example[2] not
affiliated with Facebook . The installation instructions tell people to use
yarn. Or try searching for "yarn.lock" on Github[3. There are 128K results.
There are a few reasons to expect this to continue:
- Yarn is developed and supported by Facebook. As the developers of
React, Facebook plays a huge role in the Node community and yarn will get a
lot of adoption just because it's the tool "blessed" by Facebook. Further,
Facebook has the resources and incentive to push yard forward quickly.
- NPM has been foundering for a while, and Yarn is just better. It's
faster and more reliable and easy to adopt.
- At some point, NPM Inc. will embrace yarn in order to keep control of
the package registry, which is where they make their money.
This shift will take time, of course, and most developers are still using
npm for now. But it won't be long before "I can't install your package with
yarn" is a show-stopper bug that destroys the viability of a node project.
Ideally, whenever an NPM project works, node2nix should work as well.
And this is why the node-community shift towards yarn matters to us nixers.
Increasingly, node developers are going to care more about whether it works
yarn, not npm, and projects are going to built with and tested against
yarn. So if we want node packages to "just work" with nix, basing it on
yarn's behaviour will be the easiest way to do that.
Colin
[1]
https://encrypted.google.com/search?hl=en&as_q=&as_epq=yarn+add&as_oq=&as_eq=&as_nlo=&as_nhi=&lr=&cr=&as_qdr=all&as_sitesearch=npmjs.com&as_occt=any&safe=images&as_filetype=&as_rights=#q=%22yarn+add%22+site:npmjs.com&hl=en&as_qdr=all&start=20
[2] https://www.npmjs.com/package/miku
[3] https://github.com/search?q=yarn.lock&type=Code&utf8=%E2%9C%93
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.science.uu.nl/pipermail/nix-dev/attachments/20170426/12b310b1/attachment.html>
More information about the nix-dev
mailing list