Deno 1.18 completes Web Crypto API
With Deno 1.18, an upgrade to the JavaScript/TypeScript runtime positioned as a Node.js alternative, the Deno project’s developers have completed the Web Cryptography API.
Deno’s Web Crypto API was finalized after a six-month effort. Deno now passes 98.1% of the web platform test suite for the API, according to release notes. The Web Crypto API is a standard JavaScript API for performing cryptographic operations such as hashing, signature generation, encryption, and decryption.
Deno 1.18 was published January 20. Installation instructions can be found at deno.land. Other new features and improvements in Deno 1.18:
- Deno now will automatically discover configuration files with the deno.json or deno.jsonc file names.
Error.cause
, which is a property that allows programs to indicate a cause for errors, is now displayed in all stack traces.- The nested test steps API, for specifying sub-steps for tests defined by
deno.tests
, is now stabilized. - Based on the definition of symbols provided by a dynamic library, TypeScript now will infer types of available methods and raise errors if call sites do not match expected types.
- Aliases now can be added when defining symbols in the dynamic library. Thus developers can rename symbols to keep a consistent style in code and provide multiple overloads of the same function.
- Custom headers can be set on outbound WebSockets. These can be used to provide additional information about a WebSocket connection.
- For Deno’s unstable FFI (Foreign Function Interface) APIs, a
Deno.UnsafeFnPointer
function was added, to call a function from a dynamic library available as a pointer. FFI allows users to call libraries written in native languages that support C ABIs (application binary interfaces) such as Rust and Kotlin. - The Deno Language Server has been improved, with better auto-completions for registries and simplified debugging for individual test cases.
- The Google V8 JavaScript/WebAssembly engine that ships with Deno is now version 9.8.
Copyright © 2022 IDG Communications, Inc.