News for hackers. Stuff that matters.
Re:Malicious code in the purescript NPM installer by jasonhansel on Sunday July 28, 2019 @08:42PM (#20550659)
...wow. I literally did not believe that until I clicked the link. JavaScript has gone too far.
Re:Malicious code in the purescript NPM installer by iamleppert on Sunday July 28, 2019 @08:59PM (#20550725)
The problem is clearly due to vanity metrics like number of packages motivating people to publish an insane number of useless packages to fluff their contributions.
Re:Malicious code in the purescript NPM installer by ivanfon on Tuesday July 30, 2019 @12:32AM (#20562157)
Agreed - I’ve found and been astonished by Github users who maintain hundreds of these little npm packages, all of which have usually under 10 lines of actual code, and sometimes even have chains of dependencies on the user’s other packages.

It seems like the only reason these packages get any significant downloads is when one of them gets depended on by a big package, causing the entire dependency chain of the user’s little packages to be downloaded.

Re:Malicious code in the purescript NPM installer by inimino on Monday July 29, 2019 @08:34AM (#20553875)
That is not clear.
Re:Malicious code in the purescript NPM installer by fock on Monday July 29, 2019 @04:04AM (#20552442)
well, the rate-map at least includes a function: https://github.com/sindresorhus/shebang-regex
Re:Malicious code in the purescript NPM installer by hu3 on Monday July 29, 2019 @04:14AM (#20552497)
A dependency for /^#!(.*)/;

With 8.6 mil downloads and 71 dependents...

https://www.npmjs.com/package/shebang-regex

Re:Malicious code in the purescript NPM installer by arkh on Monday July 29, 2019 @09:08AM (#20554199)
I love the useless tests : https://github.com/sindresorhus/shebang-regex/blob/1cb5d4aee...

You could replace the regexp with something matching everything and they would still pass.

Re:Malicious code in the purescript NPM installer by fock on Monday July 29, 2019 @04:37AM (#20552606)
and if you look closely, 70 of those dependents are just small-scale/bs packages and the only sensible real dependency is cross-spawn _via_ the shebang package (which applies this regex to a string). The whole ecosysten could use a purge of all those useless 1-line-requires (which were all introduced by helpful commits from the "i has 1337 downloads"-community), currently this is madness.
Re:Malicious code in the purescript NPM installer by tuananh on Monday July 29, 2019 @05:33AM (#20552856)
sindresorhus is famous for that stuff :D
Re:Malicious code in the purescript NPM installer by vhakulinen on Monday July 29, 2019 @06:16AM (#20553051)
This just made my day.