Can you give some examples of what yarn can't do and npm can, I'm curious to learn about that :)
-
-
Replying to @alanzanattadev @nsisodiya and
most of this is around reliability: npm can automatically detect unexpected changes in node_modules, autorecover from cache corruption, etc
2 replies 0 retweets 2 likes -
Replying to @zkat__ @alanzanattadev and
(it's also able to guarantee you get the same tree between two different installs. yarn's guarantees around this are notably weaker)
3 replies 0 retweets 1 like -
Replying to @zkat__ @alanzanattadev and
you can see it as a tradeoff: npm might usually be slightly slower, but it does a lot more work. yarn prioritizes speed over reliability.
2 replies 0 retweets 1 like -
Replying to @zkat__ @maybekatz and
> yarn prioritizes speed over reliability This isn't really true. Yarn was originally started to ensure deterministic installs.
1 reply 0 retweets 4 likes -
Replying to @sebmck @maybekatz and
It has been and continues to be the main focus.
1 reply 0 retweets 1 like -
Replying to @sebmck @alanzanattadev and
Yet Yarn trusts way more of its system, for the sake of performance. Cache corruption is undetectable. :\
2 replies 0 retweets 0 likes -
Replying to @zkat__ @maybekatz and
Only direct user modification of the cache can cause corruption. Yarn's cache is atomic. .yarn-metadata.json is verified for existence...
1 reply 0 retweets 0 likes -
Replying to @sebmck @maybekatz and
and is only written after a verified cache write.
2 replies 0 retweets 0 likes -
Replying to @sebmck @alanzanattadev and
we literally have folks in the wild who have complained about `~/.npm` being corrupted by many other factors external to npm besides user.
2 replies 0 retweets 0 likes
what are the scenarios and how does npm avoid them?
-
-
Replying to @sebmck @alanzanattadev and
npm auto-detects any and all cache corruption, and auto-recovers by refetching data (if possible). You can *never* get corrupt data out.
2 replies 0 retweets 0 likes -
Replying to @zkat__ @maybekatz and
sorry, i meant how does the autodetection work?
1 reply 0 retweets 0 likes - 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 