[go: nahoru, domu]

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

Revisit the use of removeNPMAbsolutePaths #509

Open
RA80533 opened this issue May 19, 2021 · 1 comment
Open

Revisit the use of removeNPMAbsolutePaths #509

RA80533 opened this issue May 19, 2021 · 1 comment

Comments

@RA80533
Copy link
Contributor
RA80533 commented May 19, 2021

It appears that npm ci creates a huge diff. None of the package.json files in node_modules have a final newline. Is this something that should be done separate from this PR?

Originally posted by @RA80533 in #487 (comment)

  • The current package-lock.json file was generated as a v2 lock file by npm 7.x. Major releases of npm prior to 7.x inserted an extra property in package.json files residing in the node_modules folder for which removeNPMAbsolutePaths was used. In other words, removeNPMAbsolutePaths no longer has anything to clean up. EDIT: This might not be true for the CI. This specific detail needs to be investigated.
  • removeNPMAbsolutePaths has the unfortunate side effect of stripping the final newline from any file it touches. npm attempts to insert a final newline if it finds that it's missing. The two work against each other to a disastrous effect. VS Code's version control integration has to be reloaded if either of them tries to undo the other because of the enormous amount of changes they make.
@aeisenberg
Copy link
Contributor

This is something to explore. Even though I see minimal benefit for existing developers, I do see how this could help facilitate new contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants