cli icon indicating copy to clipboard operation
cli copied to clipboard

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

Open kchindam-infy opened this issue 9 months ago • 2 comments

References

kchindam-infy avatar Mar 27 '25 17:03 kchindam-infy

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 https://github.com/npm/cli/issues/8008

kchindam-infy avatar Apr 10 '25 14:04 kchindam-infy

i like it 👍

mbtools avatar May 24 '25 08:05 mbtools