Paul Krill
Editor at Large

Deno 1.13 emphasizes HTTP server API stability

news
Aug 31, 20213 mins

Upgrades to native HTTP server are now advised for users of JavaScript/TypeScript runtime.

upgrade underway
Credit: Ged Carroll

Deno 1.13, released on August 10 as an upgrade to the JavaScript/TypeScript runtime, stabilizes the native HTTP server API, enabling Deno to serve multiple variants of HTTP traffic out of the box.

With the API having reached stable status, Deno now can serve HTTP/1.1 and HTTP/2 traffic. The system exposes the hyper web server as a JavaScript API. Developers currently using std/http are encouraged to upgrade to the native HTTP server, since std/http is to be removed in an upcoming release. The HTTP server API was introduced in Deno 1.9 in April.

Installation instructions for Deno can be found on the deno.land webpage. Other features cited in release notes for Deno 1.13 include:

  • A self.structuredClone function exposes the structured clone algorithm used for passing messages between web workers and MessagePort in an idiomatic, asynchronous API. This algorithm can deep clone JavaScript values and supports circular object references.
  • A DENO_TLS_CA_STORE environment variable can be used to switch certificate authorities Deno trusts for TLS.
  • An –-unsafely-ignore-certificate-errors flag can disable SSL certificate verification. Deno proponents note this is a dangerous setting and it should not be used to silence certificate errors.
  • More functionality has been added to WebCrypto APIs, such as crypto.subtle.verify now supporting verification of signatures created from Hash-based Message Authentication Code (HMAC) keys.
  • The Deno Language Server and Visual Studio Code extension have been updated, with improvements such as the language server adding a deno.cache setting that can be set via the editor. This configures the language server to use a specific path to the cache director for Deno. Also, refactoring code actions now are available for JavaScript and TypeScript files, providing refactors for common tasks such as extracting code to functions and constants.
  • For the REPL, the export keyword before functions, classes, or TypeScript types now will be ignored. This is useful when copying and pasting a snippet of code from a module into the REPL. Also, the REPL now has an —eval flag for running code in the JS runtime before the user is dropped into a REPL.
  • The Deno.permissions API has been updated; it now accepts URLs in addition to strings when querying for “read,” “write,” and “run” permissions.
  • The native plug-in system has been replaced with a more general Foreign Function Interface (FFI) API for calling libraries written in languages other than Rust directly from Deno. The API is unstable in this release.
  • The V8 JavaScript engine has been updated to Version 9.3.

Deno has been positioned as a more secure alternative to the Node.js runtime. The 1.0 release of Deno was published in May 2020, with several point releases published since then.

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