Commit the lock
The lock file belongs in the repository, not in the build machine. A lock that is not committed is a build that cannot be reproduced by anyone else, which is the whole point of pinning.
Diff the lock
A change to a lock file is a diff to read. That diff is where an unintended major bump shows up, and it is the review that stops a silent breakage reaching a release.