The latest release of Deno, version 1.18, has brought significant updates to the JavaScript/TypeScript runtime, including the completion of the Web Cryptography API. This long-awaited feature enables developers to perform cryptographic operations like hashing, encryption, decryption, and signature generation directly within the Deno runtime, bringing it in line with other modern web platforms. After six months of development, Deno now successfully passes 98.1% of the Web Platform Test Suite for the API, marking a major milestone in its evolution as a secure and performant alternative to Node.js.
The Web Crypto API integration is a key addition to Deno 1.18, allowing developers to use native cryptographic functions within their applications. This API is especially useful for web developers who need to secure data transmissions, store sensitive information, or validate signatures directly in the runtime without relying on external libraries. With this completion, Deno expands its capabilities in cryptography, addressing one of the most requested features within the community.
Alongside the Web Crypto API, Deno 1.18 introduces several other important updates to enhance the developer experience. The runtime now automatically detects configuration files named deno.json
or deno.jsonc
, streamlining setup for projects. Error handling has also been improved, with the new Error.cause
property now being displayed in all stack traces, making it easier to track down the root causes of errors. Furthermore, the nested test steps API has been stabilized, allowing developers to better organize and manage complex test scenarios.
Other notable additions include enhanced support for TypeScript, particularly with dynamic libraries. Deno 1.18 improves type inference, automatically checking method calls against the expected types defined by the symbols in dynamic libraries. Aliases can also now be added to symbols, allowing for more flexible naming conventions and method overloads. For developers working with WebSockets, the new version allows for custom headers, offering a way to include additional metadata in WebSocket connections. Additionally, the unstable FFI (Foreign Function Interface) APIs have been extended with the Deno.UnsafeFnPointer
function, enabling more powerful integration with native libraries written in languages like Rust and Kotlin. These updates make Deno 1.18 a comprehensive release that continues to solidify its role as a modern and secure runtime.