by skrebbel · 1y ago · 0 comments
That said, this seems like a weird argument to me:
> but I still don't understand why NPM didn't take the time to find out if any of my modules were widely used and consider ways to handle the unpublishing without breaking anything
Sure, NPM's unpublish mechanism was a misdesign, but is he saying that he expected people at the company to manually go through this every time someone did an unpublish? That doesn't seem too reasonable IMO, NPM the company isn't curating NPM the registry. They host it as a public service.
I can't fault the author all too much here though, if he hadn't triggered "the left-pad incident" then someone else would've not too long after. NPM fixed the problem, by means of a better unpublish policy [0] and that's that.
[0] https://docs.npmjs.com/policies/unpublish#packages-published...
The author simply ran the script that NPM themselves told him to, and later NPM blamed the author for their own failings.
But I do agree now that the author isn't really to blame.
I think the left-pad incident helped shatter that myth. He we had huge packages depending on a package which padded a string in an inefficient manner.
It turns out that the many eyeballs of the bazaar had averted their gaze from what was actually happening, which is a system of impossible to audit dependency chains.
I think it also shows the impact of using a language with a poor standard library.
Padding is absolutely something that should be available as an extension over String.
If JavaScript were controlled in the same manner that Go, Rust, Java, .NET, python etc, then it would have been added years ago.
Apparently it has now finally arrived in ES2026: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
ES2017 [1]. The MDN docs always link the latest version of the spec; the year in the link doesn't correspond to the version where it was added. The proposal was already mostly done at the time of the incident [2]
[1] https://tc39.es/ecma262/2017/#sec-string.prototype.padstart [2] https://github.com/tc39/proposal-string-pad-start-end
In what way? Have the dependency trees gotten significantly smaller since then?
The man page for a unix binary is at least two orders of magnitude larger. At some point, the "Unix philosophy" doesn't make sense anymore. I mean, it couldn't even rightpad.
oh look at me, 589 published packages on npm! with 5 700 quadripillion weekly installs!
They do in fact curate the registry, mainly for reporting vulnerabilities to consumers and to remove malicious packages.
After left-pad, I understood why.