2

Deno 1.30 backs built-in Node.js modules

 1 year ago
source link: https://www.infoworld.com/article/3687728/deno-130-backs-built-in-nodejs-modules.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Deno 1.30 backs built-in Node.js modules

The JavaScript/TypeScript runtime also updates the configuration file.

By Paul Krill

Editor at Large,

InfoWorld | Feb 9, 2023 3:00 am PST

Deno 1.30 backs built-in Node.js modules

KrulUA / Getty Images

Version 1.30 of the Deno JavaScript/TypeScript runtime, published late January 2023, emphasizes support for built-in Node.js modules and offers a major update to the configuration file.

With Deno, npm packages have already had access to built-in Node.js modules such as fs (file system), path, process, and others through the runtime’s Node.js compatibility layer. In release 1.30, published January 25, these modules are exposed to Deno code via node: specifiers. For developers using code with both Deno and Node.js, the node: scheme will work in both runtimes. Deno has been positioned as a more secure alternative to Node.js, which has leveraged npm.

Also in Deno 1.30, it now is possible to directly use a deno.json file as an import map, constituting what proponents described as a major update to the configuration file. Previously, it was possible to tell Deno where to look for an import map file by specifying the importMap key with a path to the import map file. This approach meant there were two files with configuration. To make things more concise, developers now can specify imports and scopes keys in a configuration file. Deno automatically will treat the configuration file as an import map.

Installation instructions for Deno can be found at deno.land. Deno 1.30 also includes more than 25 bug fixers pertinent to npm functionality and Node-API. APIs also have been stabilized including Deno.Listener.ref() and Deno.Listener.unref(). And deno fmt now can be formatted without semicolons.

Deno 1.30 was preceded by Deno 1.29 in mid-December 2022, featuring npm compatibility improvements and updates to the REPL. Three mostly bugfix point releases of Deno 1.30 also have been published since the arrival of Version 1.30.

Paul Krill is an editor at large at InfoWorld, whose coverage focuses on application development.

Follow

Copyright © 2023 IDG Communications, Inc.

Sponsored Links


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK