17 ms·
Yarn 4.0
- gavinray 3y agoAfter the Yarn 2 debacle, I've been using Yarn 1 (as well as most people who use Yarn that I know). I briefly tried Yarn 3 but it also did some weird things. Here's to hoping that Yarn 4 "just works" the way Yarn 1 does.
- moomoo11 3y agoSame. I was using yarn 1 until a couple years ago. Now I just use npm. What are the downsides? I have no idea. If there are, they must be negligible because the apps work fine, customers are happy, and devs are able to keep building. We must not have any crazy dependencies because I don’t see much performance gains. At most we might link other packages as we develop. I think if I really went searching for problems I might find something. I also just try to avoid JS these days unless it’s UI, and there I keep things very lean and straightforward.
- porridgeraisin 3y agoThat's the thing with tools like this. Eventually whoever you one-upped just incorporates your features and now they have the edge again - your new features and their greater experience.
- gavinray 3y agoThe sole reason I haven't migrated to NPM to be honest is the lack of a replacement for "yarn run". I use "yarn run" incredibly frequently, for things like "yarn run nodemon" and "yarn run tsc" or other executable packages that are local dependencies.
- hoten 3y agoHave you tried npx? It comes with Node. There's also npm run, but perhaps I'm missing something about how they differ
- gavinray 3y agonpx doesn't run project-installed packages, it uses global downloads The "npm run" is a command for running defined scripts in your package.json The equivalent of "npm run" in yarn is just "yarn", for example: "yarn start"/"yarn dev". What "yarn run" does is allow you to run binaries installed from "dependencies"/"devDependencies". Say that I run the following: yarn install --dev nodemon ts-node typescript I can then run yarn run tsc --init / yarn run nodemon / yarn run ts-node And it will invoke the local "./node_modules" package binaries. This is useful when you want to ensure version-locked, per-project binaries.
- hoten 3y ago`npx <package>` does run project installed binaries, if they exist (node_modules/.bin/<package>). In that scenario it's equivalent to `yarn <package>`. Otherwise yes it falls back to a global package, and a prompt to install if missing.
- addicted 3y agonpx has supported local packages for quite some time at this point.
- apineda 3y agoSame situation. I use npm on most of my newer projects and yarn on one project where I tried to upgrade it to 2 but it was pure disaster.
- nu11ptr 3y agoAs an outsider to the JS world, can someone give me the quick pros and cons between yarn and npm? Can you switch back and forth in the same project? Is the end result of your package structure the same?
- smithcoin 3y agoThey each generate their own lockfiles that contain the dependency graph so they can’t be used together. They have different utilities in the CLI for example- NPM has npm audit, which yarn doesn’t. They’re mostly the same but you have to keep in mind they have different philosophies in how to manage the dependency graph.
- acemarke 3y agoThe end result is essentially the same, yes - all directly requested dependencies, and all of their transitive dependencies, are extracted and installed on disk into `./node_modules`. Yarn came out at a time when NPM was particularly slow and buggy. NPM has caught up some since then, but I _personally_ still like Yarn better. I find the CLI output more useful, and it feels like it installs in a more consistent amount of time. You should only have one of them in use in a project at time. PNPM is another alternative package manager that installs the same packages, but tries to use symlinks to a single globally-cached copy of each package to save disk space. (I believe recent versions of Yarn have an equivalent option, but it's not on by default.)
- erhaetherth 3y ago> The end result is essentially the same, yes - all directly requested dependencies, and all of their transitive dependencies, are extracted and installed on disk into `./node_modules`. Well, no. Not if you use Yarn's zero-install or PnP or whatever they call it. It doesn't create node_modules and thus it's not very compatible, and that's the problem everyone is complaining about. And the lockfiles aren't cross-compatible either.
- solardev 3y agoTLDR: Choose one, stick with it, try not to have multiple node versions per machine/VM if you can help it, and update & test your packages in small frequent increments if you can. Otherwise it gets to be a nightmare real quick. Yarn 1.x came out because NPM was really slow and buggy back in the day. Yarn was fast and buggy. Then Yarn 2 came out, was even faster and less buggy, but not backward compatible. I've never actually seen it used in the wild, even now (it's just yarn and NPM on all the projects I've worked on). Bigger differences will come trying to upgrade multiple packages at once, especially across major versions (e.g. 2.x to 3.x). It's going to be hard no matter what, but `yarn upgrade-interactive` makes it a bit simpler, while npm has third party plugins that do similar things. There's also complexities involved if you need to switch the underlying `node` version across projects, since npm and yarn both need different node versions depending on their own version. Their final outputs are similar (a node_modules folder where all your JS dependencies and sub-dependencies live), but their internal workings are different, and you shouldn't use both together because they will conflict with each other (sometimes). Generally, switching back and forth isn't hard on smaller projects: just delete the lock files and delete the node_modules folder and reinstall everything from scratch. But you really don't want to get into the habit of doing that. There's no real benefit (just choose one and stick with it; either is fine these days), and you may introduce hard-to-catch bugs related to one of your thousands of dependencies. Especially on bigger projects, erasing the lockfile means that it will try to use the designated SemVer in your package.json to get the desired version, but that may be different than the actual version that was being used, which is stored in the lockfile as a manual override. I'm not sure why these package managers had two sources of truth, but it's a nightmare.
- smithcoin 3y agoGetting yarn berry to work was a nightmare in my org. Hopefully this release can actually simplify the toolchain.
- acemarke 3y agoI'm curious, what problems did you run into? My own experience is that Yarn 2/3 have worked great, as long as you stick with the "`node_modules` linker" option rather than the "PnP/Zero Install" option.
- smithcoin 3y agoGetting it to auth properly with GCP artifact repository in GitHub actions was a bit of a pain. Conflicting documentation between Google, Yarn and GitHub didn’t help.
- IggleSniggle 3y agoI looked into switching to yarn for the first time earlier this year, since I was having minor multi-platform issues with npm and was pretty sure yarn could fix them. Since the docs seemed to make PnP/Zero Install the "blessed path," I tried to go with that. I quickly became confused at the correct way to configure certain aspects for my org in conjunction with our build pipelines, decided it was way too much unnecessary complexity to teach to my org, and kept our npm setup.
- IceDane 3y agoBut isn't that nearly defeating the entire point of the newer versions? They basically tried to go around the entire ecosystem, and having to not use the main feature that drove the development of yarn berry just seems like proof that it was a mistake.
- acemarke 3y agoThere's other improvements too. Anecdotally I've seen Yarn 2+ install faster than Yarn 1. The UI output is more informative. The workspace behavior has been pretty solid. The "install Yarn 1 globally, Yarn 2+ per-repo" bootstrapping behavior is a bit quirky, but it does make it nice that everyone using the repo is using the same Yarn version for actual execution. I like the _idea_ of PnP conceptually, but my experience was that there's too many other tools that depend on having `node_modules` on disk for things to work out okay.
- jauntywundrkind 3y agoThe new JavaScript powered constraint engine looks amazingly simple & elegant. We definitely suffer badly trying to make the very simple example shown happen across our projects: how do we make sure everyone is using the same version of React (for example)? I'd be curious to know how this rules engine is usable outside of Yarn. The post talks about it being used at Datadog, seemingly on their app. But I didn't see or missed info on the package itself & how it might be embedded elsewhere. Also super notable from this release, turning off zero-install by default. Still such a neat idea. Even though most package managers are reasonably fast now, there's still often multiple hundreds of MB of files copied out of cache, for each project, and the idea of just directly using the cache without copying stuff in feels like a real nice to have, a potential big saver of disk space.
- huy-nguyen 3y agoI’ve been using the new yarn (with workspaces and Plug’n’Play) on a reasonably complex JS project for about 2 years and I think it works great. Congrats to the yarn team on this big release.
- d357r0y3r 3y agoAnecdotally, it seems like a lot of Yarn adoption is still suck on 1.22.x. Migrating to 2+ appears to be untenable for many teams. I understand that Yarn 2 is essentially a new tool, as there are certain features you simply can't ship while still being compatible with npm, but this hasn't resonated with developers. The initial appeal of Yarn 1 was that you could pretty much drop it into your node project and get much faster install times. `pnpm`, from what I understand, is faster than yarn, while still having that seamless interop w/ npm.
- ForkMeOnTinder 3y agoYeah I followed the same path. I originally switched from npm to Yarn 1 for the speedup, but then Yarn 2 broke enough things that I never managed to upgrade. pnpm is (at least) as fast as Yarn 1, and they managed to do it with a much better compatibility story (in my experience)
- makingstuffs 3y ago100% my experience too. I still find myself using yarn 1 for some new projects which do not support pnpm (strapi for example). I remember upgrading yarn to yarn 2 and instantly regretting it then reverting.
- animuchan 3y agoFully supporting the anecdata, different projects at my current company use all of the package managers — npm, yarn 1.x, pnpm, bun — except for yarn 2+ In personal projects I heavily gravitate towards bun as a package manager now, it's npm drop-in replacement but faster (and typing `bun run` is just so cute compared to `npm run`).
- hardcopy 3y agoI'd love to use Bun for my projects, but it's not integrated into Corepack yet (and therefore you cannot pin the bun version w/ checksum in package.json) https://github.com/nodejs/corepack/issues/295 https://github.com/nodejs/corepack/issues/295
- specialp 3y agoYarn made the same mistake going from 1 to 2 as Angular did. The newer version was so different. Both should have been named something else. At a certain point of incompatibility and divergence it is a different product, and the benefit you get from using a well known name is outweighed but the cost of confusion. Yarn 2 brought a lot of great improvements but since it was named "Yarn" people were expecting it to behave somewhat like the first one.
- diggan 3y agoSometimes I wish for a SemVer iteration that does away with the major version, and requires a project to create a new library wholesale if they want to increment the major version. Every library would have minor and patch releases, but if they want to substantially change the API, they'll have to create a new library instead and ask people to move to it instead.
- svieira 3y agoThis is similar to what Rich Hickey suggests in Spec-ulation [1] https://www.youtube.com/watch?v=oyLBGkS5ICk https://www.youtube.com/watch?v=oyLBGkS5ICk
- politelemon 3y agoThe problem with semver is what constitutes "substantially"; because it's been left to subjective interpretation, we end up with these weird situations. What may invoke a feeling of "This should have been a new library" is different for each team. Even a minor change with a deprecated method can invoke such a reaction depending on how a team has been using that library.
- diggan 3y agoTrue, I take that back. Any incompatible (public API) changes warrants a new library, not just "substantial" as it's too subjective.
- 3y ago
- kreutz 3y agoJust use bun
- fastball 3y agoI wanted to use Bun for our app but couldn't due to a lack of support for `postinstall` scripts at the moment.
- thegoleffect 3y agoAs in the dependencies you add don't run their postinstall scripts or your app's package defines a postinstall and that script doesn't run? The latter should work but the former requires an extra step for now iirc: https://bun.sh/docs/cli/install#lifecycle-scripts https://bun.sh/docs/cli/install#lifecycle-scripts
- fastball 3y agoThe former, specifically Electron. Adding it to "trustedDependencies" didn't seem to help. https://github.com/oven-sh/bun/issues/1588 https://github.com/oven-sh/bun/issues/1588
- deleted 3y ago[deleted]
- jxi 3y agoAs a Bun convert, it's interesting that they felt the need to have a preemptive response for Bun as part of this major release. The response itself seems unconvincing though: Basically, Bun is a lot faster and simpler, but they think they can catch up. I'm not convinced they can catch up even on speed, and Bun ergonomics are also a lot nicer from the get go.
- deliriumchn 3y ago> Basically, Bun is a lot faster and simpler Funny enough, I got our work project working with yarn berry (whatever number this was this summer) in 10-15 minutes, but I couldn't manage to do the same with bun. I'll try again now after they got few minor updates probably just to see if its better now...
- jxi 3y agoWhat didn't work? What was the error?
- solardev 3y agoWere you using Bun on a new project? I tried it on a few existing ones and couldn't get it to build on any of them
- jxi 3y agoConverted existing large NPM workspace-based projects. It depends which part of Bun you're talking about. Do you mean the package manager didn't work or the runtime didn't work? I would be a bit surprised if the package manager was not a drop-in replacement, but I know they recently fixed a lot of bugs too.
- solardev 3y agoBoth. This was a while ago (early this year, late last year?). I didn't care about the runtime, but the package manager kept crashing, and I spent a few hours digging through the error logs and trying to fix each error one by one, but never got far enough to actually successfully build my project. (It was just a basic static-file TypeScript app with lots of older dependencies). I unfortunately don't have the logs anymore. I'd be happy to try Bun again on new personal projects, but I'd be afraid of using it for any real-world work project at this point; the risk of having to spend time debugging it isn't worth the performance improvements (since the packagers are usually just run on CI/CD anyway, and local `next dev` or similar is already fast enough).
- solardev 3y agoYarn's versioning is really confusing. Is 4.0 compatible with 1.x? Is it a successor to Yarn 2 (with the different functionality)? What happened to 3? Haven't really kept up with this since 2 wouldn't work with any of my projects, not sure where to pick up again now...
- depr 3y agoI mean... Why would it be compatible with 1.x if 2 wasn't? There is an upgrade guide to upgrade from 1 to 2 and later. 3 has been out for a long time. Not sure how their versioning is confusing. It uses the major version number to signal (possibly) breaking changes.
- solardev 3y agoIME most projects use semver to indicate possibly breaking changes that might require a manual fix or three, not a whole different project that requires 100% changes across the board and starting over from scratch. Even node itself doesn't just kill your projects with every major version. Judging by the other comments in this thread, and the blog post saying that "zero-install is disabled by default", I had kinda hoped 4 would be a reboot of Yarn v1 with modern conveniences. This does not appear to be the case. I'm still not sure whether it goes like "2.x -> 3.x -> 4.x are all in the same line, and upgrading from 2 to anything beyond that is easy" or if they are each as different from each other as 2 was from 1. That's the confusing part. (Like, did the 2.x line stabilize into 4.x, or are these just four separate projects altogether?) I think it would've been a lot clearer if they just named Yarn 2+ something entirely different, like Moment did with Luxon
- HatchedLake721 3y agoAm I the only one that after doing Node.js for ~10 years never had much issues with npm or a need for yarn? Yes, if memory serves me right, yarn might've been first with `yarn.lock` before `package-lock.json` was a thing. But why would I use yarn today? I don't care about speed of npm install locally, I do it once in a blue moon. I don't care if my pipeline takes 3 minutes (yarn) to install dependencies instead of 5 minutes (npm).
- gryn 3y agothe reason to try yarn for me was berry pnp to avoid those pesky node_module folders but alas the experience has been bumpy on personal projects. for something that has promised more robustness, it has been anything but that. I still like the yarn cli more than the npm one, but I ended up just defaulting to npm.
- lucideer 3y ago> But why would I use yarn today? I think many many many people switched to Yarn 1.x wholesale and then switched back to NPM once it had undergone some improvements.
- leptons 3y agoThat's me. But for some projects I've had to switch back to yarn, because npm no longer works to install node_modules, and I don't really care why. Yarn works on those projects, npm does not. If npm works for a project, I use that, but there are some where yarn works and npm simply errors and quits.
- spankalee 3y agoThis is exactly what I did. I even participated in the Yarn project a bit before it was fully open, but as npm 6 and 7 brought major speed improvements, workspaces, and overrides, I don't see the need for an alternate package manager anymore. As a library maintainer using the same package manager that most of my users do is a pretty big help. I'll be very happy when npm's linked install strategy is stable so that there's less reason to use pnpm and we get dependency isolation in monorepos.
- stephen 3y agoKinda surprised by all the "stuck on Yarn v1" comments so far... We went through the same "~2015 everyone uses yarn", "~2020 everyone goes back to npm" cycle, but in the last ~year or so are back on yarn v3 for...reasons that I forget (oh yeah, the ability to download multiple platform libs for when you're running in docker [1])...but :shrug: it's been great. My only complaint is that `yarn dedupe` should be automatic (as it was in yarn v1), or at least via a flag. :-D But otherwise yarn v3 (with the node_modules linker) has been great, and look forward to using v4. [1] here's the "afaict npm can't do this?" snippet we use in `.yarnrc.yml`: https://gist.github.com/stephenh/43c7f15b97b73baf821f2a22c62172c7 https://gist.github.com/stephenh/43c7f15b97b73baf821f2a22c62...
- depr 3y agoSkipped v2, v3 works fine for me as well.
- swsieber 3y agoI was a yarn 2+ convert because of how much faster installs were (and the corresponding reduced disk bloat). It unfortunately doesn't play well with Angular, and lots of people fall back to the "node_modules" strategy which does away with much of the benefits. Is there any good comparison out there of the JS package managers, and the trade-offs they make? I happen to really like the disk/time vs compatibility trade-off yarn 2 makes, but not the zero-install (which had been the default for a time). But hearing that Bun is faster, and better ergonomics? And other people mentioning pnpm? That makes want a package manager in depth comparison.
- swsieber 3y agoI want to take a minute on rant about the insanity that is having node_modules used a caching location. That's the big reason for the incompatibility for between npm and any package manager that attempts to clean up the node_modules mess (though the impact varies by solution). Maybe I'm just spoiled, coming from java, where you can expect your libraries to be in a read-only archive, and that tools separate the runtime from their cache.
- 5e92cb50239222b 3y agoJust use pnpm. It uses the same node_modules so you get 100% compatibility with all sorts of frameworks/build systems/IDEs, but stores all files in a single global content-addressable directory, and hardlinks everything from there (or reflinks if your filesystem supports it). It also hides indirect dependencies so you don't import them accidentally (you can still use a flattened directory if you need it). If you install libfoo@1.0.0 and libfoo@1.0.1 and the only difference between them is a single file, the second copy will only add that file to disk. If you then install that libfoo@1.0.0 into a hundred projects spread across your disk, no files will be copied (both reflinks and hardlinks only add a bit of filesystem metadata). https://pnpm.io/feature-comparison https://pnpm.io/feature-comparison https://github.com/pnpm/pnpm#benchmark https://github.com/pnpm/pnpm#benchmark
- jmull 3y agoWhat is the value proposition of this over npm? (I last looked at this closely way back... back then it solved problems I didn't have and didn't solve the problems I did have.)
- microflash 3y agoYarn lost the plot when going to v2. It was very different from v1. Even attempting a migration was painful enough to write it off completely in the projects I was working on. I've yet to come across any new projects using Yarn since then. Now, I think it is too late. pnpm has more or less caught up and even surpassed any advantages Yarn had, with a much more pragmatic compatibility across multiple platforms. Personally, I've moved on to pnpm (with npm as a fallback when I can't use pnpm).
- k__ 3y agoHaven't used this until today, but I browsed the code and the docs and it all made a very solid impression.
- joduplessis 3y agoNice job team!
- k__ 3y agolol, I just installed Yarn for the first time and got version 4.0.0, what a coincidence! A clean major version? At this time of the year? In this part of the world? I've never been more suspicious of a tool :D But the codebase is really nice, especially the comments in the plugin system. I'm SO gonna extend that thing.
- bhouston 3y agoI find there is less room for yarn in the ecosystem than back when npm was crazy slow. In my testing, npm has gotten a lot faster that it used to be and often it is faster than yarn 3.x when doing installs in a CI system. npm also has decent workspace support, excluding the important ability to do topological sort-based builds (which I still use lerna for.) I also found bun install also works great and fast and is a drop in replacement for npm.
- doodlesdev 3y agoGreat release which solves the biggest painpoints with the latest Yarn versions. I still like zero-installs and yarnPath providing Yarn for anyone using the project, but not having zero installs and using corepack to provide Yarn seems like the right choice which reduces friction for adoption. Also, not having to install plugins such as interactive-tools is sooooo good. I have no ideia why these are plugins in the first place as they are so essential to using Yarn. I still wish PnP faced better adoption though. In most projects I still go back to using the pnpm or the node-modules linker because of various issues with PnP which are sometimes hard to debug. In other notes, why the hell in Node corepack still experimental and not enabled by default? I simply don't get it.
- solatic 3y agoWe switched already to pnpm and won't look back. > Hardened Mode, constraints engine a) pin your dependencies, set save-prefix='' in .npmrc, use a tool like pnpm outdated, Renovate, Dependabot, npm-check-updates to keep them updated. Doesn't need to be done or enforced in the package manager, Git Hooks and CI are sufficient. b) use syncpack to ensure all your dependencies in different workspaces use the same versions. This doesn't need to be done in the package manager. pnpm also has pnpm licenses to help keep compliance happy. If someone wants to write a package manager in Rust for speed (pnpm is already moving in this direction, see https://github.com/pnpm/pn https://github.com/pnpm/pn and https://github.com/pnpm/pacquet https://github.com/pnpm/pacquet ), we'd take a look. Otherwise - not enough benefit to switching away.
- silverwind 3y agoSaid rust npm package manager already exists, but it's somewhat buggy still: https://github.com/orogene/orogene https://github.com/orogene/orogene
- solatic 3y agoInteresting, but no support for workspaces yet: https://github.com/orogene/orogene/issues/161 https://github.com/orogene/orogene/issues/161
- __jonas 3y agoI'm just trying to switch to pnpm and I'm a bit lost on how to dockerize packages in my workspace, something that I thought would be a common thing to do. The example in their docs [1] seems to just be wrong > FROM common AS app1 > COPY --from=prod-deps /app/packages/app1/node_modules/ /app/packages/app1/node_modules > COPY --from=build /app/packages/app1/dist /app/packages/app1/dist This of course will not work, since the node_modules folders of packages in a pnpm workspace just contain symlinks to the virtual store at the root of the monorepo, not the actual modules. I don't see any good way to do what this example pretends to achieve (minimize docker image build size) since even when hoisting is forced, pnpm seems to only ever hoist node_modules in the root of the repo. Sorry for this somewhat unrelated rant, I was just surprised at hitting such an obstacle immediately after trying to adopt pnpm after I heard so much praise for this tool. [1] https://pnpm.io/docker#example-2-build-multiple-docker-images-in-a-monorepo https://pnpm.io/docker#example-2-build-multiple-docker-image...
- ulrischa 3y agoI'm not so deep in front end. Can somebody explain me the differences to npm?
- deleted 3y ago[deleted]
- IceDane 3y agoYarn 2 was just a colossal mistake. In nearly any real project it causes constant churn and is just a perfect example of what happens when you let some computer scientist do whatever they feel is nice from a theoretical perspective rather than based in reality. There isn't even any arguing with it being an abject failure. It's just abundantly obvious when you look at how many people keep using yarn 1. These patch notes even prove it since they realized how insane it is to make their zero install thing the default.
- h1fra 3y ago> We have been writing our own rules at Datadog with this framework for a couple of months now, with great success Did I miss something, Yarn has been acquired by Datadog or is it poor wording?
- Krastan 3y agoI've been waiting for this for the .env support for .yarnrc.yml. we can now have our GitHub PATs in a .env instead of having to add it to your shell env or risk leaking it or putting thr PAT directly in the .yarn.yml
- firebaze 3y agoWhy can't the JS ecosystem simply accept its non-complexity, deal with it and be done? I know my share of frontend technology, React, Angular, AngularJS, MUI, Bootstrap and so on, Vue, Next, Nuxt, Svelte. Others. None of it is really complex, there are competing, but increasingly incorporating patterns at play, just fighting for views, stars and clicks. In the end, it boils down to the ever same boilerplate JS feeding a browser. Please don't misunderstand me: JS can as complex as any "turing-complete"¹ language. But the things which seem to bother us have been solved over and over again, and there are no new solutions in sight, but only reformulations. ¹ there is no real turing-complete language out there, since memory is limited. Flamewar inc.
- wilg 3y agoI came here to complain about how there are two JS package managers that are virtually identical, and learned there is a third. Fellas, sort this out. This is a waste of human potential. (I also still think package managers should be language and ecosystem independent. We just need one way of getting named and versioned folders of files from the internet.)
- ozim 3y agoI count npm, yarn, bun, pnpm - but I am also not really a frontend guy.
- bostonvaulter2 3y agoThere's also lerna
- madjam002 3y agoWow so much negativity here, I just can’t imagine not having Yarn PnP for my project with 15+ packages all in a monorepo. It’s super easy to patch 3rd party packages, fast at installing and adding new dependencies, and it plays so nicely with Nix which is great for CI/CD, as with a bit of tooling all of your packages will be cached between builds. Even some “heavyweight” frameworks which I didn’t expect to work, work fine, such as NextJS. I’m a very happy Yarn Berry user.
- rtsao 3y agoYarn 2.0 was ambitious, but in hindsight, it probably would have been better to make regular node_modules the default rather than pushing PnP and zero installs (and alienating most users in the process). I think Yarn Berry with node_modules linker is strictly better than Yarn 1.0, whereas PnP and zero installs involve tradeoffs that might not be right for everyone. There's a lot of great design decisions in Berry that gets muddled with all the PnP-related discussion. I will say Maël deserves a lot of credit for driving corepack, which makes version control of package management totally seamless. It's always been a total nightmare but now it's shockingly easy.
- Alifatisk 3y agoWhat do I benefit from using Yarn over Pnpm?
- jimrandomh 3y agoI'm also in the "still using Yarn 1.x" camp. The problem is that yarn is installed to the global path by a package manager from outside the Javascript ecosystem, which means that the same install of yarn is shared between all the projects I might run on my system, including projects I don't maintain myself and including projects that aren't maintained at all. I'm open to other JS package managers if they offer benefits, but the one that runs when I type "yarn" in my shell has to be backwards-compatible with 1.x, forever. Repositories like Debian/apt-get and homebrew operate on a similar philosophy, and still offer only 1.x. So... why didn't they just put a package-manager version number in package.json? I would have no problem with projects requiring Yarn 2+, if upgrading to Yarn 2+ didn't create an obstacle to continuing to run everything else that still uses Yarn 1. As it is now, I'm not willing to even _try_ the newer versions, because I expect to have to revert and I'm worried that I'll lose a day to the mess that the uninstall/revert will create.
- sod 3y agoThe history of yarn is fascinating. Dependency management in our monorepo is super smooth since we use it. We are on version 3.6 right now. I admire that arcanis tried something very bold with plug and play and zero installs in version 2 and 3, but is willing to default back to node_modules since it didn't stick. Must have been hard to come up with something this good, but then nearly everyone rejecting it.