-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package-lock.json
actually needed?
#651
Comments
One the one hand, in the past we run into issues that even minor changes of libraries broke the tests etc. (see #379 or #395) On the other hand I see your arguments also. Having said that, I find it also confusing that we need to update 2 different files ( My personal take is that IF we can live without @relu91 @egekorkan opinions? |
I would prefer to keep it to not have those headaches again. The only disadvantage I see is the need to add another file to the commit right? My answers to some arguments:
I think the problem persists when dependencies themselves do not fix the version. (Not super sure about this)
I think I did not understand this one.
But if I download a nodewot package as an npm dependency, its dependencies are not installed with the lock file versions right?
Two things about this.
|
Thank you for your responses! I think what I had in mind was this issue comment: sindresorhus/ama#479 (comment) Here they argue that you should not use a |
That issue is a nice thread where the opposing opinion is also presented (in a yarn article). So I am not sure since I find both side's arguments quite valid. |
I would vote for keeping it, as sadly we are depending on libraries that do not strictly follow semver (argh 😞 ) not having the package-lock would cause painful debugging of what is happing in the CI. Plus don't forget that node-wot is also a CLI tool that is quite similar to an application. I agree with want has been said in the YARN article:
Furthermore, managing the lock file is not a big deal when you use the right In conclusion, I would keep it. |
I think you made some good arguments, @relu91. I would then propose closing this issue and keeping the lock file :) |
When adding or updating dependencies, I got the impression that
package-lock.json
sometimes causes problems if it isn't handled with care. From what I've learned over the last couple of months, lock files are not recommended for libraries but only for actual applications which require a certain set of exact dependencies to ensure that they always work.As you could also fixate the version of a dependency by not using the
^
or~
prefix, I wanted discuss removing the lock file again which would have the benefit of "automatic" updates for patch releases of dependencies. It would also make it more efficient to usenode-wot
besides other modules that have the same dependencies but slightly different versions in theirpackage.json
files.Do you see any real benefits for the
package-lock.json
file? Or would it make sense to remove it?The text was updated successfully, but these errors were encountered: