Revert "Add package-lock.json"#141
Conversation
This reverts commit c393d37.
|
It looks like consensus around this has changed over the years.
|
|
We had a very similar discussion with amqplib - amqp-node/amqplib#702 |
|
I see the point for the CI environment maybe. But if non latest version is important among the dev dependencies they can be locked down in package.json. Reproducable build shouldn't be a problem in this case as the library got 0 runtime dependencies. The consensus does not seem to have changed for other languages (Ruby or Crystal) The 5000 line lock file effectively doubles the number of lines of code in this repo, and should probably have to updated all the time. |
|
Did a I have no problem with CI catching issues with the latest dev dependencies. |
This does not pin transitive dependencies
Actually looks like it has for Ruby. I'm learning as we go here :) Or maybe not consensus, but the "official" standpoint:
But not for Crystal:
Anyway, I don't have a strong opinion and ok to go in either direction here. I just wanted to research it a bit since I didn't think committing lock-files for libs was a thing. |
|
I believe the reason for adding the lockfile was supply chain attacks, from https://cloud.google.com/blog/topics/threat-intelligence/supply-chain-node-js
|
|
That's one of the reasons this library has no dependencies, unfortunately there are some dev dependencies, we could try to remove as many as possible of them too, to reduce the risk. |
|
But as no one will ever check each dependency manually i dont understand how a lock file would do any difference. Ppl will do npm update, no? |
|
At least you have a chance to install what's in the lockfile with |
|
I understand both sides of this, and I have myself avoided Gemfile.lock in Ruby library projects. :) I was onboard with this change and while I never said it oud loud in Slack, I was thinking Dependabot would be updating the lockfile here regularly. Minimizing the number of dev dependencies sounds great whatever we do here, it would lower the churn if we keep the lockfile, and it would lower the number of third-parties we need to put trust in if we remove the lockfile. I don't have any strong feeling what we do here. I often run "unknown" things in Docker. :) |
Reverts #139
Libraries should not have their lock files checked in.