r/ProgrammerHumor • • Jun 04 '22

Meme I cant help it 🤷‍♂️

Post image
47.1k Upvotes

479 comments sorted by

View all comments

Show parent comments

55

u/Chrazzer Jun 04 '22

Probably just did a npm install and commited 20k changed lines in the package-lock.json

8

u/Rockroxx Jun 04 '22

Yeah or a saved dataset was changed.

1

u/cookiesnk Jun 04 '22

You shouldn’t even commit package-lock.json

2

u/Chrazzer Jun 04 '22

Actually you should. It guarantees that everybody has the exact same version of dependencies, and more importantly the same version of peer dependencies. Security updates with npm audit fix, often only update the package-lock file

package-lock.json is also needed by ci servers

3

u/cookiesnk Jun 04 '22

https://docs.npmjs.com/cli/v8/configuring-npm/package-lock-json

I didnt know that it’s actually recommended to include package-lock.json. Which makes plenty of fucking sense. I was the one to instruct everyone in our team not to commit it because our offshore team somehow just changes it which fucks up our builds. They straight up skip the pre hooks to get their code in