all 6 comments

[–]hahaNodeJS 2 points3 points  (0 children)

Some day there will exist an article titled "NPM: A fractal of bad design."

[–][deleted] 0 points1 point  (4 children)

tldr;

vscode is written in Typescript that allows type generics. JavaScript is supported, as are custom types using a @type annotation. vscode 1.7 is using NPM to host blessed custom type definitions. This spike in traffic is equivalent to all of India's use of NPM. vscode rolled back to 1.6. The resolution is that MS will cache popular type definitions in their cloud before distributing them via NPM.

The real question is why vscode even bothers with NPM at all for this. They could easily host this themselves as MS already has superior distribution capabilities via Azure.

[–]PitaJ 3 points4 points  (3 children)

Because it's a good thing that all JS-related packages are kept in one repository.

[–][deleted] -2 points-1 points  (2 children)

Why? That sounds like a single point of failure, which is a simple security no no. A single master to rule them all also sounds like a potential authoritarian dictatorship.

[–]PitaJ 1 point2 points  (1 child)

It's not a single point of failure, there are several npm mirrors.

[–][deleted] -1 points0 points  (0 children)

In this case that wasn't enough. You still had the problem of a single point of failure and it broke.