3 ms·
Do you think something like leftPad needed updates every month to perform its function as expected and remove bugs? Node libraries are a bit odd in that respec
by onion2k 4y ago
Do you think something like leftPad needed updates every month to perform its function as expected and remove bugs?
Node libraries are a bit odd in that respect because package JSON files have an "engines" property that informs users about the minimum and maximum Node version the library works with. The author of leftpad could check its compatibility with each new version of Node that's released, and update the engines value version accordingly. That would be quite helpful because abandoned libraries that aren't known to be working with newer Node versions don't get updated, and users can user that information to look for something else.
What that means is that any Node library that isn't being updated as often as Node itself is probably not actively maintained, or the author isn't making full use of Node's feature set.
- franciscop 4y ago> "The author of leftpad could check its compatibility with each new version of Node that's released" Really? This sounds feasible at all for you for all the millions libraries in npm not to be labelled as "obsolete"? Checking if string concatenation still works on every major node release and tagging it as such?
- onion2k 4y agoThis sounds feasible at all for you for all the millions libraries in npm not to be labelled as "obsolete"? Yes. I mean, they could just leave the max version of the engines property blank because it should always work if it's something as trivial as leftpad, but in a well-run package repository the work of checking library compatibility should be getting done. The fact that NPM is full of old libraries that haven't been tested in new versions of Node is a bad thing, and those libraries should be flagged as untested.