DEV Community


Discussion on: Don't Make NPM Packages Unless You Need To

sr229 profile image
Ayane Satomi Author

There is a right to complain when you start seeing packages that already exists in JavaScript natively. My standpoint here is that its okay to publish packages, but as long it helps people in a way. The main argument of the problem is that some of the packages is already existing as a builtin method/function. TC39 exists to improve some language intricacies, and maybe we should support more the upstream work instead of making our own solution.

As for some packages with no actual purpose, save the joke packages, is that some of them are literal empty packages (aka no dist files at all), hence why this has been a recurring problem in NPM.

galkowskit profile image
Tomasz Gałkowski

That is mainly NPM's problem of not forcing namespacing in form of username/package_name. Namesquatting wouldn't be a problem. Those "stupid" libraries - well, nobody forces anyone to use them, they are oftentimes polyfills that were required in the past and are obsolete now. It's up to project owners to update their dependencies and remove legacy stuff. I don't see a problem really, maybe with the exception of namesquatting. Essentially, if you find library useless - don't use it. If at least one person found a use for it - it is not useless. No need for gatekeeping.