Ask HN: Should you commit package-lock.json?
We are trying to decide if we should commit package-lock to version control for our JavaScript project.
It is generally considered a good practice to commit package-lock to version control to avoid breaking anything due to the dependency updates and thus we have been committing it till now.
However, we are facing some problems. Everytime we run `npm install`, package-lock is overwritten whenever a new version is detected from `^` in package.json. This causes a lot of merge conflicts which are impractical to merge in the long run.
We were thinking of freezing the dependency versions in `package.json` itself and update them only when we really need to update them. In this way, we do not need to maintain package-lock. But this does not let us auto update the deps with incremental bug fixes that are released in the minor versions.
What do you people think?