News for hackers. Stuff that matters.
Re:NPM proxy users receiving ERR 418 I'm a teapot by Arnavion on Tuesday May 29, 2018 @02:43AM (#17176963)
Vendor your dependencies, or host clones on infrastructure that you're responsible for.
Re:NPM proxy users receiving ERR 418 I'm a teapot by bartread on Tuesday May 29, 2018 @03:02AM (#17177031)
Vendoring isn't ideal: it makes, for example, code-reviews a PITA, and you still have the problem of what to do when you upgrade or add a dependency. Then you're back to npm (or yarn). Granted, at much reduced frequency, but it's still there.

Maybe we'll go down the clone route if the cost of npm issues becomes too high relative to the hassle and expense of maintaining our own.

Re:NPM proxy users receiving ERR 418 I'm a teapot by krapp on Wednesday May 30, 2018 @06:20AM (#17186482)
>Vendoring isn't ideal: it makes, for example, code-reviews a PITA, and you still have the problem of what to do when you upgrade or add a dependency.

The status quo in which anything that goes wrong breaks the entire universe because no one vendors is also not ideal.

However, consider the long list of disasters that have occurred with NPM recently, and how many of them would have been less disastrous had vendoring been the exception rather than the rule. Left-pad wouldn't even have been an issue, for example - builds simply would have been unable to update, but nothing live would have been affected.

To misquote Ben Franklin here, the tradeoff isn't between a greater ideal and a lesser ideal, but between security and convenience.

Re:NPM proxy users receiving ERR 418 I'm a teapot by acemarke on Tuesday May 29, 2018 @12:48PM (#17180830)
That's why I really like Yarn's "offline mirror" feature. It lets you cache the tarballs themselves locally. There's also a tool called `shrinkpack` that lets you do the same when working with NPM itself, but I'm not sure if it works right with NPM5/6.

I wrote a post a while back about using Yarn's offline mirror: http://blog.isquaredsoftware.com/2017/07/practical-redux-par...

Re:NPM proxy users receiving ERR 418 I'm a teapot by numbsafari on Tuesday May 29, 2018 @08:20AM (#17178430)
One way to keep vendoring from causing nightmare code reviews is to keep updates to vendored components in their own release/branch/PR. Yes, there will be changes to your code to accommodate the updated packages, but it keeps it very focused so that the code review isn’t also trying to evaluate updates to business rules or functionality.

If you are updating components along with business rule updates, then, yes, it’s going to complicate code review, regardless of vendoring.

Re:NPM proxy users receiving ERR 418 I'm a teapot by acejam on Tuesday May 29, 2018 @12:55PM (#17180900)
Vendoring dependencies typically entails committing at least 200-500 MB of packages into a git repo. No thanks. Availability should be easy to control with running your own Nexus or other internal registry. The rest (package versions, etc) can often be solved with an npm 5+ lock file.