Deno 1.15, the latest release of the JavaScript runtime positioned as a secure alternative to Node.js, features a new flag that makes it easier to run Node.js programs in Deno.

Deno 1.15 was published October 12. When the

1
--compat

flag is present, Deno will automatically set up Node global variables, such as

1
process

, and provide all built-in modules available in Node. Note that this flag currently requires

1
–-unstable

.

The version of

1
–-compat

in Deno 1.15 is just a first pass. More work will be put into improving compat mode in coming releases, moving toward Node emulation. According to Deno 1.15 release notes, std/node is a module that provides a compatibility layer for Node APIs, enabling developers to run a subset of Node programs in Deno. The release of std 0.111.0 updates the compatibility layer, adding desired modules including dns, http, and net, along with updates to the cryptocode module.

To read this article in full, please click here


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *