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 latest add extra empty line to the package.json #19315

Closed
1 of 4 tasks
robertIsaac opened this issue Sep 24, 2023 · 4 comments · Fixed by #23440
Closed
1 of 4 tasks

nx migrate latest add extra empty line to the package.json #19315

robertIsaac opened this issue Sep 24, 2023 · 4 comments · Fixed by #23440
Assignees
Labels

Comments

@robertIsaac
Copy link
Contributor

Current Behavior

when I ran nx migrate latest even if there are nothing to update it always add one extra empty line at the end of the file
because it cases nx format:check to fail in the pipeline if unintentionally committed

Expected Behavior

to have only one empty line at the end of the package.json file

GitHub Repo

https://github.com/robertIsaac/nx-ng-nest

Steps to Reproduce

  1. clone the repo
  2. run nx migrate latest

Nx Report

Node   : 18.16.0
   OS     : win32-x64
   npm    : 9.6.7

   nx                      : 16.9.0
   @nx/js                  : 16.9.0
   @nrwl/js                : 16.8.1
   @nx/jest                : 16.9.0
   @nrwl/jest              : 16.8.1
   @nx/linter              : 16.9.0
   @nrwl/linter            : 16.8.1
   @nx/workspace           : 16.9.0
   @nx/angular             : 16.9.0
   @nrwl/angular           : 16.8.1
   @nx/cypress             : 16.9.0
   @nx/devkit              : 16.9.0
   @nx/eslint-plugin       : 16.9.0
   @nrwl/eslint-plugin-nx  : 16.8.1
   @nx/nest                : 16.9.0
   @nrwl/nest              : 16.8.1
   @nx/node                : 16.9.0
   @nrwl/tao               : 16.9.0
   @nx/webpack             : 16.9.0
   nx-cloud                : 16.4.0
   typescript              : 5.1.6
   ---------------------------------------
   Community plugins:
   @nguniversal/builders       : 16.2.0
   @nguniversal/express-engine : 16.2.0
   ---------------------------------------
   The following packages should match the installed version of nx
     - @nrwl/js@16.8.1
     - @nrwl/jest@16.8.1
     - @nrwl/linter@16.8.1
     - @nrwl/angular@16.8.1
     - @nrwl/eslint-plugin-nx@16.8.1
     - @nrwl/nest@16.8.1

   To fix this, run `nx migrate nx@16.9.0`

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

if there are 0 empty lines it add one empty line (to be 1)
if there are 1 empty line, it add additional line (to be 2)
if there are 2 empty lines, it doesn't or remove one line (stay 2)
if there are 3 empty lines, it remove one line (to be 2)
if there are 10 empty lines, it remove 8 lines (to be 2)

so it seems it check for the lines, but the check is faulty

@AgentEnder AgentEnder added the scope: core core nx functionality label Sep 26, 2023
@tuffz
Copy link
Contributor

tuffz commented Nov 12, 2023

I can confirm the same behavior on macOS.

Copy link

This issue has been automatically marked as stale because it hasn't had any activity for 6 months.
Many things may have changed within this time. The issue may have already been fixed or it may not be relevant anymore.
If at this point, this is still an issue, please respond with updated information.
It will be closed in 21 days if no further activity occurs.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label May 11, 2024
@robertIsaac
Copy link
Contributor Author

This issue has been automatically marked as stale because it hasn't had any activity for 6 months. Many things may have changed within this time. The issue may have already been fixed or it may not be relevant anymore. If at this point, this is still an issue, please respond with updated information. It will be closed in 21 days if no further activity occurs. Thanks for being a part of the Nx community! 🙏

hi bot, the issue still exists please don't close the ticket

@github-actions github-actions bot removed the stale label May 12, 2024
leosvelperez added a commit that referenced this issue May 16, 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 #19315
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 #19315

(cherry picked from commit 5757350)
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants