Deno Supports Built-in Node Modules
Written by Kay Ewbank   
Thursday, 02 March 2023

Deno has been updated to add support for built-in Node modules. Deno is the JavaScript and TypeScript runtime from the creator of Node.js.

Deno uses V8 and is built in Rust. It is described as secure by default as it has no file, network, or environment access, unless explicitly enabled.  Deno was created by the same developer who created node.js - Ryan Dahl - and its name is a rearrangement of the letters in node.

deno

The support for built-in Node modules changes the way npm packages access built-in Node.js modules such as fs, path, and process. Until now, these had to be accessed through Deno's Node.js compatibility layer. In this release, these modules are exposed to Deno code via node: specifiers.

This release also brings a major update to the configuration file making it possible to directly use a deno.json file as an import map. You could already tell Deno where to look for an import map file by specifying the path to it, but this meant that there were two files with configuration. To make it more concise you can now specify imports and scopes keys in your configuration file and Deno will automatically start treating the configuration file as an import map.

Other recent improvements to Deno include other npm compatibility improvements such as support for custom npm registries via the NPM_CONFIG_REGISTRY environment variable.

REPL support has also been improved with the addition of npm support, meaning you can now use npm packages directly from the REPL. deno repl runs with no permissions by default. There's also more reliable REPL history handling.

Deno 1.3 is available now.

deno

More Information

Deno Website

Related Articles

Deno Joins ECMA

Deno 1.14 Improves Web Crypto Support

Deno 1.10 Adds Web Storage API Support

Deno Developers Form Company

Deno Adds WebGPU Support

Node.js Even Its Creator Thinks Its Flawed 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Looking Forward To NAO 7
03/11/2024

Introduced to the world in 2004 by its creator Bruno Maisonnier the kid-sized, autonomous humanoid robot NAO, turns 20 this year. At less than 2 ft tall, it is small in stature, but plays a big r [ ... ]



Google Updates Responsible AI Toolkit
01/11/2024

Google has announced updates to the Responsible Generative AI Toolkit to enable it to be used with any LLM model. The Responsible GenAI Toolkit provides resources to design, build, and evaluate open A [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info