Skip to content

fix: omit name from package-lock.json in case of package.json don't have name #8193

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

Draft
wants to merge 2 commits into
base: latest
Choose a base branch
from

Conversation

kchindam-infy
Copy link

References

@kchindam-infy kchindam-infy requested a review from a team as a code owner March 27, 2025 17:12
@kchindam-infy kchindam-infy marked this pull request as draft March 27, 2025 17:23
@owlstronaut owlstronaut force-pushed the latest branch 2 times, most recently from 85ec0c9 to 26b6454 Compare March 27, 2025 18:03
@kchindam-infy kchindam-infy changed the title Don't default name is not available iin package-json chrome:omit name from package-lock.json in case of package.json don't have name Mar 31, 2025
@kchindam-infy kchindam-infy changed the title chrome:omit name from package-lock.json in case of package.json don't have name chore:omit name from package-lock.json in case of package.json don't have name Mar 31, 2025
@kchindam-infy kchindam-infy changed the title chore:omit name from package-lock.json in case of package.json don't have name chore: omit name from package-lock.json in case of package.json don't have name Mar 31, 2025
@kchindam-infy
Copy link
Author

While name is not available in package.json, packag-lock.json inherits name of the directory which results in changes in package-lock.json each time when someone use the repo with different name which don't have any actual changes.

To resolve it we can omit name from package-lock.json in case of no name available in package.json.

This PR enhances the omission of the 'name' field from the package-lock.json when the package.json does not include a 'name'. This changes ensures consistency and avoids unnecessary data in the lock file. Passes all the test cases

References

Related to #8008

@kchindam-infy kchindam-infy marked this pull request as ready for review April 10, 2025 14:26
@kchindam-infy kchindam-infy marked this pull request as draft April 10, 2025 14:46
@wraithgar wraithgar changed the title chore: omit name from package-lock.json in case of package.json don't have name fix: omit name from package-lock.json in case of package.json don't have name Apr 10, 2025
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

Successfully merging this pull request may close these issues.

1 participant