In the light of recent NPM supply chain attacks, I believe it would be greatly beneficial for us to reduce the number of dependencies in both XS and Cristal as much as we can.
In Cristal for instance, we sometimes import lodash-es to use a single, ~10 LoC debounce function. Given the low amount of code and complexity this represents, we could very well get rid of it and integrate it inside our codebase.
The same goes for several other dependencies we currently have. One of the arguments against it was that it reduced our maintenance efforts ; on which I disagree again, as upgrading packages is not always simpler, and very simple code pieces don’t need maintaining most of the time anyway.
On the security aspect, one proposed mitigation would be to wait for a few days before upgrading dependencies. Thing is, more and more people are gonna go this way, which will increase the time required to discover infected dependencies, so in my opinion it’s a necessary but not sufficient effort.
I personally (very) strongly believe we should reduce our dependencies, as it reduces our attack surface, and as a bonus even simplifies maintenance as we don’t have to worry about breaking changes on their side.
What is your opinion on that subject?