Deno gets npm support! – Frontend Weekly vol. 101

Deno is one of the more interesting projects growing in the JavaScript community. In June, Deno Company raked in $21 million to develop its cloud, and less than a few weeks ago the first framework dedicated to Deno was published. This past week, the company shared the functionality heading to their runtime environment, and there is definitely something to hang your eye on.

Article cover

Big changes are coming to Deno

If I had to list the projects we write about most often in our reviews, Deno would definitely be among them. Last week, the team responsible for its development shared with the community their plans for the near future. What can we say – a lot is going to happen! After many years of cutting themselves off from npm, we are finally getting  compatibility with the most popular JavaScript package manager. On top of that, expect a lot of performance improvements in the http server.

Deno and npm? If you remember the history of the project, you are probably scratching your head right now. After all, the story of Deno begins in 2018, when one of the developers of Node.js decided to fix the mistakes made in its design. One of the biggest mistakes mentioned at the time was the use of node_modules and the creation of npm. How is it that 4 years later Deno nevertheless gets npm support?

Let’s start with the fact that npm support will be only partial. This is because Deno won’t get the node_modules directory, and libraries will still be pulled in a “browser way” using a cache. The only thing to worry about in the proposed solution is even greater complexity of the JavaScript import system.

import express from "npm:express@5";

If we are looking for reasons for opening up to npm, let me make my personal diagnosis here. In March 2021, Deno Company was founded, fueled by nearly $5 million from independent investors. In June of this year, the project won another round of funding,  this time amounting to as much as $21 million.

It’s hard to make money on JavaScript runtime engine development alone, so the company focused on expanding its cloud infrastructure. The result of more than a year of work is Deno Deploy, an infrastructure of Edge Functions that can run Deno. The project has already found its first commercial customers in the form of Supabase (an open source alternative to Firebase), or Netlify, who have decided to base their Edge Functions precisely on Deno Deploy.

You can probably guess where I’m going with this. Along with external investors and customers, come expectations of growth. Deno has really built a lot around the idea of better Node.js. However, it seems that without meaningful integration with npm, further development would slow down.

The other big news heading to Deno is a completely new http server, which is supposed to be the fastest of its kind for JavaScript. I’m sure that work on this feature has been going on for some time. However, I suspect that the publication of a separate release note on this topic is strongly linked to the hype around the Bun project that has emerged in recent weeks.

If you’re interested in the details, we devoted an entire section to this technology in the 99th edition of our review. For all the forgetful and lazy, I’ll remind you that it’s supposedly a faster drop-in alternative to Node.js. In addition to performance, Bun also offers some nice features such as a much faster alternative to npm or the ability to create macros (i.e. code generated during compilation with access to the AST tree).

It is not yet known how long we will have to wait for the next version of Deno, but I am already looking forward to it. In the meantime, the team developing the project has decided to initiate so-called “Office Hours”. These will be weekly meetings where you will be able to ask your nagging questions directly. If you are interested in the details, I invite you to read the sources for more.


Discover more IT content selected for you
In Vived, you will find articles handpicked by devs. Download the app and read the good stuff!

phone newsletter image

NativeScript Preview 2.0

NativeScript is a tool for creating native mobile applications using JavaScript. Originally it was an Angular alternative to React Native, but over the years it lived to support all major frameworks (Angular, Vue, React, and even Svelte!). Today, however, we won’t be writing about NativeScript itself, but about NativeScript Preview 2.0. This is because it’s a tool that makes it fabulously easy to remotely launch a native application.

The process of remotely launching an application using NativeScript Preview 2.0 is be divided into two steps. First, we download an application from the Play store, or AppStore from the developers of NativeScript. Then we run the appropriate script in the console, scan the generated QR Code and voila! A working native application appears before our eyes. What’s more, if you modify the application code in the IDE it will automatically refresh in the application.

The new preview system brings two non-obvious possibilities. First, with its help, it will be possible to build iOS apps without owning a macOS device. Second, it will be possible to simply share a developer version of the app, quite useful for demo purposes.

This is not the end of the news. NativeScript, in cooperation with StackBlitz, has prepared templates with the help of which the entire process described above is enclosed in the browser. If a few years ago, someone had told me they are writing a native application in the browser, and previewing the effects on an unconnected phone, I would have considered them crazy. Well, the future is today.

Unfortunately, there’s one fly in the ointment. For the new preview to work properly, our application can only use a finite set of native plugins. We can only count on the developers of NativeScript to keep this list updated on an ongoing basis.


Discover more IT content selected for you
In Vived, you will find articles handpicked by devs. Download the app and read the good stuff!

phone newsletter image

Bonus: meet.js summit

meet.js is a nationwide brand that brands meetups all over Poland (personally, I regularly attend the ones held in Krakow). When they reached out to us about collaborating on a conference they were organizing, I had no doubt that it would be something you would be interested in.

If you like JavaScript (if you didn’t, you’d rather not be here) and at the same time like to help (and who doesn’t!), there will be a meet.js summit conference in October, the profits from which will be donated to charity. The conference will take place in Poznan, Poland, on September 26, and unfortunately there is no way to connect to it remotely (on the other hand, it will be a unique opportunity to meet other weirdos who like to write in JavaScript). Entries cost just 99 PLN, and the agenda includes some cool topics for fans of innovation (I’ll mention Building Fullstack Apps in Record Time with Blitz.js and React Remixed here as an incentive).