Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nx migrate skip lock files in the commits #23505

Closed
1 of 4 tasks
robertIsaac opened this issue May 17, 2024 · 0 comments · Fixed by #23820
Closed
1 of 4 tasks

nx migrate skip lock files in the commits #23505

robertIsaac opened this issue May 17, 2024 · 0 comments · Fixed by #23820
Assignees
Labels
scope: core core nx functionality type: bug

Comments

@robertIsaac
Copy link
Contributor

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 robertIsaac/daemon-process-terminated-reprod@1d4dd50 included only package.json as well as robertIsaac/daemon-process-terminated-reprod@5b84127 robertIsaac/daemon-process-terminated-reprod@d480e70 and robertIsaac/daemon-process-terminated-reprod@20f3e89

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

  1. npx create-nx-workspace@17.0.0
  2. choose angular then it doesn't matter
  3. npx nx migrate latest
  4. 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
  • Windows
  • Other (Please specify)

Additional Information

No response

@FrozenPandaz FrozenPandaz added the scope: core core nx functionality label May 17, 2024
leosvelperez added a commit that referenced this issue May 21, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #23505
FrozenPandaz pushed a commit that referenced this issue May 21, 2024
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #23505

(cherry picked from commit 6be46cf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: core core nx functionality type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants