nx migrate skip lock files in the commits
Current Behavior
when running nx migrate --run-migrations --create-commits and one migration update package.json, the lock files e.g. yarn.lock, package-lock.json ... etc doesn't get included in the associated commit
here is an example
https://github.com/robertIsaac/daemon-process-terminated-reprod/commits/master/
you can see that https://github.com/robertIsaac/daemon-process-terminated-reprod/commit/1d4dd50af62a3a7668a6c8f92a7dba19ce443e62 included only package.json as well as https://github.com/robertIsaac/daemon-process-terminated-reprod/commit/5b841272ffc338ff1d9580adbb0cd65e3cac9aae https://github.com/robertIsaac/daemon-process-terminated-reprod/commit/d480e7012d2a670c21a73dc947648304bdf23d41 and https://github.com/robertIsaac/daemon-process-terminated-reprod/commit/20f3e8977c72c503ea7e564346e260c6837bc1bb
it creates problems if the developer pushed without adding the lock files changes or if you later on needed to revert/drop commit regarding only one update (e.g. to revert cypress update because it started failing but keep everything else), because it only reverted the change in package.json only then the package.json and the lock file are out of sync
Expected Behavior
to include the appropriate lock files in the commits that update dependencies, in the reprod repo for example to include package-lock.json
GitHub Repo
https://github.com/robertIsaac/daemon-process-terminated-reprod
Steps to Reproduce
-
npx [email protected] - choose angular then it doesn't matter
-
npx nx migrate latest -
npx nx migrate --run-migrations --create-commits
Nx Report
Node : 20.12.2
OS : win32-x64
npm : 10.5.0
nx : 19.0.4
@nx/js : 19.0.4
@nx/jest : 19.0.4
@nx/linter : 19.0.4
@nx/eslint : 19.0.4
@nx/workspace : 19.0.4
@nx/angular : 19.0.4
@nx/cypress : 19.0.4
@nx/devkit : 19.0.4
@nx/eslint-plugin : 19.0.4
@nrwl/tao : 19.0.4
@nx/web : 19.0.4
@nx/webpack : 19.0.4
typescript : 5.4.5
Failure Logs
No response
Package Manager Version
No response
Operating System
- [ ] macOS
- [ ] Linux
- [X] Windows
- [ ] Other (Please specify)
Additional Information
No response