When I install an npm package, Package Installer doesn't update package.json or package-lock.json if the files are read-only. The files are read-only because they are (TFS) source controlled and not checked out.
Steps to recreate
Create a new web application
Install an npm package so that the package.json and package-lock.json files are created.
Check in the code to a TFS server, using a server workspace, including package.json and package-lock.json.
At this point, package.json and package-lock.json are read-only.
Try to install another npm package.
Current behavior
Packager Installer will download the npm package into node_modules, but package.json and package-lock.json are not updated.
Expected behavior
I expected Package Installer to check-out package.json and package-lock.json if they are source controlled.
If I open package.json and manually edit it in the Visual Studio IDE for example, it will automatically check-out the file, so I expected the same behavior.
Installed product versions
Description
When I install an npm package, Package Installer doesn't update package.json or package-lock.json if the files are read-only. The files are read-only because they are (TFS) source controlled and not checked out.
Steps to recreate
Current behavior
Packager Installer will download the npm package into node_modules, but package.json and package-lock.json are not updated.
Expected behavior
I expected Package Installer to check-out package.json and package-lock.json if they are source controlled. If I open package.json and manually edit it in the Visual Studio IDE for example, it will automatically check-out the file, so I expected the same behavior.