News for hackers. Stuff that matters.
Re:Hello Yarn 2, Goodbye node_modules by vvoyer on Monday August 09, 2021 @05:40PM (#28122656)
Yarn 3.0 was released in July 2021 (https://dev.to/arcanis/yarn-3-0-performances-esbuild-better-...)

Meanwhile, as much as I respect the work of Mael (yarn maintainer) I’ve switched back to npm. Mostly because:

- isaacs (original creator of npm) did some commits lately

- now backed by GitHub

- they introduced workspaces (monorepo support) in npm 7

- it’s still easier to use the standard tooling in dev/ci/prod

- like many, I had issues trying to convert my projects to yarn v2/3

The only thing yarn did I want in npm is an easy way to enforce the npm version across all environments (https://classic.yarnpkg.com/en/docs/cli/policies/).

Re:Hello Yarn 2, Goodbye node_modules by pataar on Tuesday August 10, 2021 @02:29AM (#28125689)
Regarding the enforcement of the NPM version: ever heard of https://volta.sh?
Re:Hello Yarn 2, Goodbye node_modules by brundolf on Wednesday August 11, 2021 @01:04AM (#28138219)
The only thing I miss about yarn when I switch to NPM is the way you can run package scripts without the word "run". Just "yarn build". It's the tiniest thing but it makes a difference with how often you do that. I hope NPM copies it some day.
Re:Hello Yarn 2, Goodbye node_modules by mauflows on Monday August 09, 2021 @06:19PM (#28123026)
Can you fix transitive dependencies in npm natively yet? That's why I switched to yarn.
Re:Hello Yarn 2, Goodbye node_modules by trinovantes on Monday August 09, 2021 @06:21PM (#28123049)
What kind of issues did you encounter converting to yarn 2/3?
Re:Hello Yarn 2, Goodbye node_modules by theshrike79 on Tuesday August 10, 2021 @02:24AM (#28125669)
Not the OP, but there was no clear tutorial on how to do it when I first tried it.

I've got actual work to do, I don't have time to spend a day or two figuring out how to do yarn2 on our dev machines + CI env + prod. So we just stuck with yarn1.

Now when Yarn 3 is out, it's either back to npm, which is supposedly on par with yarn1 in speed or I'll try a yarn 1 ->3 transition.

Re:Hello Yarn 2, Goodbye node_modules by fuzzy2 on Tuesday August 10, 2021 @05:32AM (#28126777)
Not that I’m a fan of Yarn 2+, but this view strikes me as narrow. Setting up and upgrading the development environment is actual work, too! If you don’t treat it as such, developer efficiency will suffer in the long run.
Re:Hello Yarn 2, Goodbye node_modules by theshrike79 on Tuesday August 10, 2021 @06:20AM (#28127045)
But breaking the development and CI environments will prevent a good dozen people from working. So it's a risk vs reward question.
Re:Hello Yarn 2, Goodbye node_modules by fuzzy2 on Tuesday August 10, 2021 @07:46AM (#28127634)
Unless it’s some arcane setup, I don’t see what would break from one developer trying stuff on a branch.

Even if you don’t have your build pipelines in the same or any repo, you could probably clone then modify them on a reasonable CI server.

Re:Hello Yarn 2, Goodbye node_modules by kall on Tuesday August 10, 2021 @10:42AM (#28129449)
I'm currently using yarn 1.17. Is the npm workspaces support on par with yarn 1? If so I might switch back to that.
Re:Hello Yarn 2, Goodbye node_modules by dmt0 on Tuesday August 10, 2021 @11:43PM (#28137737)
`resolutions` is what I wanna see in NPM