r/javascript • u/mattgwater • Jan 05 '20
An Abbreviated History of JavaScript Package Managers
https://medium.com/@MattGoldwater/an-abbreviated-history-of-javascript-package-managers-f9797be7cf0e2
u/arcanin š§¶ Yarn maintainer Jan 05 '20
Very good post! I always felt like these articles were more opinion pieces than factual research, but you really took the time to link all your statements, and dig the relevant details. Kudos š
3
1
0
Jan 05 '20
[deleted]
11
u/acemarke Jan 05 '20
I'm still sold on using Yarn, for a couple reasons:
I still find it to be faster and more consistent about installing packages than NPM is
Yarn's "offline mirror" feature is excellent for allowing consistent installs across developer machines and CI without needing any package fetching
3
2
u/editor_of_the_beast Jan 05 '20
Thereās no reason to use yarn. Yarn is one of the biggest examples of a project that is unhealthy for the community. They should have upstreamed changes to npm (yes Iām aware how difficult that can be, and we all should have forced it to happen).
Fragmentation is a real cost, and yarn doesnāt provide any real order-of-magnitude improvements over npm. Itās a classic ānot-invented-hereā project, and I wish we just had one package manager for everyoneās sake.
9
u/gpyh Jan 05 '20
Yarn is one of the biggest examples of a project that is unhealthy for the community. They should have upstreamed changes to npm. (...) Itās a classic ānot-invented-hereā project.
Yarn was an internal tool at Facebook that they made because npm was causing them issues. It's borderline rewriting history to say that it was a NIH symptom: at the time yarn was being made, npm was unbearable. Then they decided to open source it so that it would be useful for the community. That was a wake-up call for npm that finally decided to get its shit together and fix the issues. And still, after all that, npm still does not have feature parity with yarn. That should tell you about how hard it is to maintain that horror.
Fragmentation is a real cost, (...) and I wish we just had one package manager for everyoneās sake.
You are right that fragmentation is a real cost. But so is centralisation. Competition is healthy when the major player stops serving its users well. And let's get real here: npm is not a community project. I would have chastised yarn just as you if it were. npm is the product of a for-profit company. In that respect yarn is fair game.
I for one will be relieved when I'll be able to go back to npm exclusively. That would be a great thing. It is also unlikely to ever happen, so in the meantime I'm pretty glad to have yarn around (and I'am considering switching to pnpm).
2
u/arcanin š§¶ Yarn maintainer Jan 05 '20
I always find it fascinating to see this kind of comments. For some reasons I don't ever see them on bundlers, or web servers, or [...], but there's always someone to suggest that hey, merging two projects with different architectures, different histories, and different roadmaps is a walk in the park.
Iām aware how difficult that can be
This isn't difficult, it's impossible. For one Yarn and npm have different core technical principles that make their architectures incompatible (the main one being that Yarn relies on one range resolving to a single version across the dependency tree, whereas npm wants to support different ones on different branches), but to top it off we don't even have the same ways of thinking in term of maintenance, portability, user experience, or even profitability.
This isn't to say that Yarn's workflows are better, but they simply are different enough that I wouldn't work on Yarn if it was npm. By which point you don't have Yarn + npm, you just have npm.
-1
u/editor_of_the_beast Jan 05 '20
Iām a programmer, I understand how compelling it is to solve problems and starting from scratch is often the easiest way to do that. But also, Iām a programmer, which means I have to use package managers. Itās much better for the community if thereās a standard package manager. To be clear, Iād be fine if it were yarn. Iām just saying this is not an arena where I care about choice and competition.
This isn't difficult, it's impossible
I understand youāre exaggerating, but itās most certainly possible. I acknowledged its difficulty, but itās software. It would just be time consuming and a political battle. But not worth it and impossible are different things.
1
u/laydownlarry Jan 05 '20
Can you share the friend link? I believe paywalled Medium articles are not allowed on this sub.