News for hackers. Stuff that matters.
Re:Hello Yarn 2, Goodbye node_modules by _fat_santa on Monday August 09, 2021 @10:04PM (#28124480)
I can't speak to other package managers but one silver lining about all of them (npm, yarn and pnpm) is they all are pretty interoperable. Between yarn and npm for example, I'm pretty sure they have virtually the same API so migrating from one to the other is a simple matter of using `yarn <command>` instead of `npm <command>`
Re:Hello Yarn 2, Goodbye node_modules by idoubtit on Tuesday August 10, 2021 @05:34AM (#28126781)
No, yarn and npm don't have the same CLI API. For instance, the most basic command that adds a dependency :

npm install [package]

yarn add [package]

Even the options for this command are different (--save-dev vs --dev). In fact, the situation is even more confusing, since `yarn install` exists but does not accept parameters:

     yarn install
    [1/4] Resolving packages...
    success Already up-to-date.

     yarn install something
    error `install` has been replaced with `add` to add new dependencies.
    Run "yarn add something" instead.