* npm allows a module to be deleted
so all fetches of published name-oldversion fail
* npm allows you to take-over the name of a deleted module
and publish name-newversion
* npm does not allow you to "re-publish" name-oldversion
which had existed before the deletion
but npm ops forced this publish for your special case
That's a strange combination of constraints. If you're going to reserve the name-oldversion permanently, you might as well leave the content there too. (Except, I guess, for license compliance...)For the record they made sure the exact same code was published to 0.0.3 so that I didn't maliciously inject anything. I control subsequent versions though.
You meet someone at a conference and the next conference he shows up again and you should know right away he's not actually somebody else.
Since old code is under a very permissive license, then the new owner could create v0.0.4 add code and make the new version closed with a restrictive license.
This is where a license like GPL would benefit overall, since all future code requires to be under the same license.
Either way, it seems like a dangerous policy to allow someone to re-own a previous owned and published module. Licensing is not the real threat but malicious code that potentially could be deployed.
The WTFPL licensing comes from the package.json file, which is in the GitHub repo.
I guess this is why debian takes licenses so serious.
And vast numbers of people are suddenly shocked (shocked!) to realize there's no mechanical verification of stuff like this. It can all happen whimsically, and the result isn't just a loss of service, it's service with different results and no verification nor notice.
From this thread it sounds like: a) npm specifically overrode their normal process to allow him to publish new code at the same version number b) npm did verify that the code he was publishing was the same as the old code at that version number as part of this.
So sounds like immutability of specific versions is systematically enforced by npm?
There's a difference between trusting a server to do something, and having the software you're using check that the server hasn't changed its behaviors in ways that may... fuck with the continuity of your zen.
If someone can decide to do a special thing that happens to break all promises, and my side of the tooling doesn't let me know, much less let me confirm acceptance of the changes, then my side of the tooling is seriously deficient.
And in a situation where this tooling then starts executing new code from a new author on my host as my user without any authentication except "trust the server"... the same behavior describes $script_kiddie_virus_of_the_week! "download code from C&C server; run it, thanks:D" What's the difference between this and outright RCE exploit? "good intentions"?
I'd rather have something more than "good intentions" controlling what code ends up running on my computer, thanks.
[1]https://github.com/azer/left-pad/blob/master/package.json#L2...
And, if he wanted people to take the time to be polite and contact him through his github account, maybe he shouldn't have wrecked so many people's builds.
Someone was nice enough to write some software, that is clearly indispensable. They were nice enough to not charge money for it. They were nice enough to support it, again free of cost. They were also nice enough to open source it, such that if it ever became more convenient for you to fork/change/do whatever you want with, that you would be able to.
And when that same person is being bullied (regardless of legalities) and instead of building them up, helping them fight against their bullies, you decided to shrug your shoulders, go against their wishes, exploit the fact that its open source, and when asked if you felt bad about it, responded: (paraphrased) "Well... technically..."
On the one hand: Really? You don't even feel bad about it? Do you not see that it is machiavellian? You don't even care enough to use the age old "better of two evils"/"end justifies the means"/etc arguments? Bold.
On the other hand: Kudos! I don't think I would be able to pull it off like you do.
I really don't care either way about this situation.
I truly find humor/curiosity in the attitude of the grand parent.
https://github.com/azer/left-pad/issues/4#issuecomment-20006...
You really publishing his code again is "going against his wishes"?
He made his point and got a lot of attention to the situation, he isn't responsible for the packages anymore. I would not assume that he wants further disruption or objects to people using his code.
If they did not want other people to be able to register those package names on npm, they should not have relinquished control of them.
function padLeft(s, width, padCharacter) {
var d = width - s.length;
return d <= 0 ?
s :
(padCharacter || " ").repeat(d) + s;
}(For what it’s worth, I changed it from this to show off ES6.)
function repeat(s, times) {
return new Array(times + 1).join(s);
}
function padLeft(s, width, padCharacter) {
var d = width - s.length;
return d <= 0 ?
s :
repeat(padCharacter || " ", d) + s;
}I think what's great about external modules is: * you only need to update the package file to get the benefits of new versions of dependencies * you can call `require('left-pad')` instead of what can end up like `require('../../utils/string').leftPad` * your code only describes _what_ it's doing, not _how_ (declarative programming)
Then you can’t use left-pad, because it doesn’t support that and you don’t maintain it. So you make your own module to suit your needs, which is a very good thing and returns somewhat to the actual point, which is that anyone can make their own left-pad that matches the existing module, so the author’s wishes wouldn’t have a huge impact even if they were that the module stayed down, which they weren’t. Phew!
What if it were 0.3.0 instead? The common dependency relation would allow 0.3.1 too and allow you to easily deliver a minor update.
I think of it similar to letting a domain name expire. The original author removed the code and I forked it and published a new version with the same package name.
The main issue was there were so many hard coded dependencies to 0.0.3 so I asked npm support if they could allow me to re-publish that version and they complied since I was now the maintainer of that package.