-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Any reason to ignore the package-lock.json in .gitignore #3133
Comments
commit your changes and push if needed. |
Hi @acatzk, I don't understand your comment, are you sure that you wanted to respond to my question? Regards |
This is all correct if one uses node-sass as the standalone tool and does not want to risk breakage by uncontrolled dependency updates. But I guess in that situation you can either (1) freeze the versions yourself (2) control updates in your environment anyway. Maybe I am not up to date with the newest npm development, but if node-sass is installed as a dependency of the actual project, this would mean that additional fixed dependencies will be collected only for node-sass, despite having a situation when a possibly updated version in the parent project would be just fine. I think we should restrict versions installed in the case where we have a declared ("semantic versioning major update") or actual ("oh sorry this minor release actually broke $stuff") incompatibility. |
Hi @saper, Thanks for your response but I think that you didn't get the point of the comment that I made three years ago. This is an issue not even for the final clients using You can potentially be publishing a code that is totally different to the code that was tested locally by the developers, because the tree in the developer machine could be potentially different to the tree that the CI environment generates. The code that you wrote is always the same, but the dependencies that your code uses are not. Different developers developing If the last minor or patch version of one of your dependencies gets a bug, a All of these issues are solved with a This issue affected me when in the past I wanted to contribute to the project and local tests were failing, so I opened the issue just because of that. But I never got to contribute and I am not using Regards |
Hello:
I’ve noticed that
package-lock.json
is ignored in .gitignore. This change was introduced in #2149 and there is a comment asking for its deletion and another comment stating that it is generated automatically bynpm
so it has been added to.gitignore
.But it is important to know what is the intention of package-lock.json and why it is important to keep it in the repository:
node_modules
without having to commit the directory itself.The most important thing about package-lock.json is to ensure when one runs
npm install
one will get a known-to-work state of the entire tree (which is not ensured if this file is removed and each user has their own version of the tree).But maybe I don’t have the entire context of this change, there was any specific reason for it?
The text was updated successfully, but these errors were encountered: