Deno 1.30 backs built-in Node.js modules
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.
Deno 1.30 backs built-in Node.js modules
The JavaScript/TypeScript runtime also updates the configuration file.
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.
Copyright © 2023 IDG Communications, Inc.
Sponsored Links
Recommend
-
74
这几天前端圈最火的事件莫过于 ry(Ryan Dahl) 的新项目 deno 了,很多 IT 新闻和媒体都用了标题:“下一代 Node.js”。这周末读了一遍 deno 的源码,特意写了这篇文章。长文预警(5000字,11图)。 0. 为什么开发 Deno?
-
17
Original article: https://aralroca.com/blog/from-node-to-deno Last week I published an article about Deno, and how to create a
-
34
每日前端夜话 第338篇 翻译: 疯狂的技术宅 作者:Aral Roca 来源:aralroca 正文共:8941 字 预...
-
13
-
9
2018年,我曾经在deno发布不久写过一篇《Deno不是下一代Node.js!》的文章,正好最近有一些研究,站在2021年再来看看deno。 无疑,deno改变了大家的对包管理的看法。本身deno够小,试错成本低,它确确实实引领了一个潮流方向。这...
-
3
2021再看Deno(CDN for JavaScript modules的思考) ...
-
6
How does Node.js load its built-in/native modules?This post stems from a recent Twitter conversation and a bug
-
2
Deno runtime backs inlay hints for coding The latest Deno runtime automatically pulls in TypeScript types via NPM, and it updates to the V8 10.8 JavaScri...
-
3
Deno 1.28: Featuring 1.3 Million New ModulesWe're excited to announce that Deno 1.28 stabilizes npm compatibility, which means you can now import ov...
-
5
Deno 1.33 debuts built-in key-value database Currently in beta, Deno KV is a strongly consistent key-value database integrated into the open-source Deno...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK