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.
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.
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.
I use "yarn run" incredibly frequently, for things like "yarn run nodemon" and "yarn run tsc" or other executable packages that are local dependencies.
There's also npm run, but perhaps I'm missing something about how they differ
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.