Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Related Rants
So I have replaced npm with yarn due to performance boost and the lockfile.
Never will there be problems with unexpected versions of dependencies!
Wait.
Why is my build writing a yarn.lock?
It turns out, if you want yarn to exit with an error code if it's out of sync with the package.json, you have to run it with:
$ yarn install --frozen-lockfile
Only then it will produce an error.
The default for it is to notice, oh, there is some new dependencies, let resolve this to the most current version I can fetch, and use that one, and write a new lockfile. Meaning you will get unknown futures of a depdency. O_o
That's totally going besides the purpose of having a lockfile in the first place. Why would anyone want this?
Action I do expect to touch the lockfile:
add / remove / upgrade
Action I do NOT expect to touch the lockfile:
install
Install should just install whatever is in there, and if it realizes it is out of sync, die with an error.
But that would make sense!
Who needs sensible defaults anyway!?
undefined
lockfile
npm
package.json
yarn.lock
yarn
sensible defaults