Hacker News new | ask | show | jobs
by qbasic_forever 1206 days ago
Deno caches your dependencies locally.

If you are building something that demands high availability you probably want to host the dependencies yourself though. Which is easy, you just copy them and serve them as static files (assuming their license allows that use).

1 comments

Dope this answers my question. Honestly as I've become a more seasoned developer, I've increasingly come to appreciate the utility of mirrors for build systems too.

It's not always simple in every module system though. Currently, I want to figure out how to create a mirror for our Electron codebase, but it's tough because some of the modules fetch gyp native headers that live in other locations (including the Electron core packages themselves) and NPM doesn't always know what to do. The Electron core header URLs flake every 2-3 weeks or so and inevitably we lose a lot of engineering time.

Hoping Deno continues to gain steam and makes this simpler since everything is URLs all the way down.

There's a command line option to use a local (project) directory for said cache, and you can commit into your code repo... so no package down time to worry about.

Though, hard to beat live ref to a githubusercontent url.