DEV Community

Discussion on: How a developer broke the internet by un-publishing his package containing 11 lines of code

Collapse
 
pampatzoglou profile image
pampatzoglou

IMO it's not a matter of how many lines of code the package is, but a matter of how well tested it's in the CI pipelines. When you see in the repo that the authors have added tests that make you happy, you may use it. If the only tests are a linter then it's time to look for a different package. The power of open source is that in fact, you can see these things and not put your trust in some entity.

Collapse
 
bytebodger profile image
Adam Nathaniel Davis

But the situation in the original anecdote completely bypasses any question of testing. Because you can test a package all day long, but the core question is: What do you do if that package... disappears???

Thread Thread
 
sarafian profile image
Alex Sarafian

That is also part of my point. Every package is a dependency and a potential problem. You need to weight the benefits against the risks.

If for every package you need to check quality, license and lifetime then maybe the overhead is to big. If the organisation has actual oss policies, then it can get out of control. What if the package changes license?

There is a reason that in ESCROW agreement, all dependencies are included.

Thread Thread
 
bytebodger profile image
Adam Nathaniel Davis

Agreed. This is also why many companies have started using solutions like Artifactory.