Paul Krill
Editor at Large

Deno 1.15 improves Node.js compatibility

news
Oct 19, 20212 mins

New version of the Node.js alternative also makes progress toward a feature-complete Web Crypto API.

command line
Credit: Thinkstock

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 --compat flag is present, Deno will automatically set up Node global variables, such as process, and provide all built-in modules available in Node. Note that this flag currently requires –-unstable.

The version of –-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.

Deno 1.15 is available to current Deno users by running deno upgrade. Other highlights of Deno 1.15:

  • Progress has been made toward a feature-complete Web Crypto API, with the goal of feature-completeness by the end of the year. With this release, improvements have been made such as RSA keys now being exportable in SPKI (Simple Public-Key Infrastructure) format.
  • FFI (Foreign Function Interface), an API added in Deno 1.13 to call libraries written in languages such as C, C#, and Kotlin, adds support for non-blocking calls and buffer arguments.
  • A deno uninstall sub-command has been introduced to remove a command previously installed with deno install.
  • deno lint now supports the –-watch flag, which will keep the process alive after printing diagnostics and watch for file changes to update diagnostics from changed files.
  • An experimental sub-steps API has been added to the Deno testing framework, allowing uses to define sub-steps for tests defined by Deno.test.
  • The following APIs have been stabilized: Deno.kill, Deno.Process.kill, Deno.resolveDNS.
  • The Google V8 9.5 JavaScript engine is included.

Deno 1.14, featuring additions to the Web Crypto API, was released on September 14.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author