Deno team promises npm compatibility and ‘fastest JavaScript runtime web server ever built’


Deno, created by Ryan Dahl who is the original author of Node.js, will get easy import of npm packages and a new HTTP server which is the “fastest JavaScript web server ever built,” according to a post by Dahl and Alon Bonder, head of Strategy and Operations.

Deno has some momentum, with 4.1 million downloads on GitHub and 250k monthly active users according to the post, but its biggest adoption blocker is the dominance of the Node and npm ecosystem, which is embedded in the software development process for many developers. Dahl and Bonder now say that “we’ve been working on some updates that will allow Deno to easily import npm packages and make 80-90 percent of npm packages work in Deno within the next three month.”

The speed issue is no doubt prompted by the advent of bun, a new rival to both Node and Deno now in preview, which has shown remarkable performance figures for both its JavaScript bundler and its http server. Bun is already npm compatible, with support for 90 percent of Node API functions, and its developer makes a point of not using the V8 runtime adopted by both Node and Deno, saying that “the JavaScriptCore engine … tends to start and perform a little faster.”

Dahl and Bonder, in making the promise of the fastest JavaScript web server, state that “we are 100 percent confident that the technology stack Deno is built on, V8 and Rust, can deliver this.” The optimized server, which is for http/1.1 rather than http/2, appears to be called flash and can be previewed on GitHub.

Deno 1.0 was released in 2020, and Dahl said that it was an effort to fix “design mistakes in Node” with a new and better runtime. Features include native TypeScript and WebAssembly support, and web platform standards including use of ES (EcmaScript) modules, whereas Node.js has the additional legacy of CommonJS modules.

Deno does not currently use the npm package manager though, or any package manager. “In Deno there is no concept of a package manager as external modules are imported directly into local modules,” the docs explain.

The Deno community has reacted positively to the announcements, with npm compatibility the big attraction, though one developer on Deno’s Discord forum asked “The support of 80-90% of npm pkg in deno will be great but how we know if pkg x will be supported or not?”

Another developer, on Hacker News, said that “npm compatibility is huge for Deno. It is basically the one major drawback to Deno.”

That said, cementing the dominance of npm is a potential downside for some. “Npm is the main thing I dislike about Node … I hope compatibility is a feature meant for easing transitions, not something the general user base should be embracing,” opined another dev.

The Deno team was likely already planning better Node and npm compatibility, but the advent of Bun (even though it is at an early stage of development) seems to have injected some fire into the competition – which is likely good news for JavaScript and TypeScript developers.