cli
cli copied to clipboard
fix: omit name from package-lock.json in case of package.json don't have name
References
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
i like it 👍