Press "Enter" to skip to content

Deno 1.30 backs built-in Node.js modules

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

With Deno, npm packages have already had access to Node.js built-in modules like fs (filesystem), path, process, and others through the Node.js compatibility layer of the runtime. In version 1.30, released on January 25, these modules are exposed to Deno code via node: specifiers. For developers who code with Deno and Node.js, the node: schema will work in both runtimes. Deno has positioned itself as a more secure alternative to Node.js, which has been leveraged by npm.

Also in Deno 1.30, it is now possible to directly use a deno.json as an import map, constituting what proponents described as a major configuration file update. 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 that there were two files with configuration. To make things more concise, developers can now specify imports and scope keys in a configuration file. Deno will automatically 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 related to npm and Node-API functionality. APIs have also stabilized, including Deno.Listener.ref() and Deno.Listener.unref(). AND deno fmt now it can be formatted without semicolons.

Deno 1.30 was preceded by Deno 1.29 in mid-December 2022, with npm compatibility improvements and REPL updates. There have also been three point releases of Deno 1.30 bug fixes released since the arrival of version 1.30.

Also Read:  Protocols, APIs, and conventions | InfoWorld

Copyright © 2023 IDG Communications, Inc.

Be First to Comment

Leave a Reply

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