-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Bugthing that needs fixingthing that needs fixingDuplicateduplicate of another, existing issueduplicate of another, existing issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Current Behavior:
When using npm@7, if the folder name in which the project is being built matches the name of the project in package.json, a name property is actively removed (or never set) from package-lock.json.
If the project folder does not match the name in package.json then the property is actively set.
This is a change controlled file by definition. At the very least, this can cause thrashing of package-lock.json if multiple developers are working on the same project and their working copies are in different folders.
Expected Behavior:
The folder in which a project is checked out on the local file system should have zero bearing on the content of package-lock.json.
Steps To Reproduce:
- Check out a project into a folder with a name that matches the name of the package.
- Do an
npm install - Check the content of
package-lock.jsonand confirm that oddnameproperty does not exist. - Rename the project folder to something that does not match the name of the package.
- Do an
npm install - Note that `package-lock.json" changes.
- Open
package-lock.jsonand confirm that oddnameproperty does exist.
Environment:
Keysox, JStrebeyko, nlwillia, brian-allemana and Eireen
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingDuplicateduplicate of another, existing issueduplicate of another, existing issueRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
