Deno Land has announced the release of Deno 2.2, a major update to the Deno runtime for JavaScript and TypeScript. This new version brings significant enhancements, including built-in OpenTelemetry for monitoring logs, metrics, and traces, as well as a major upgrade to the Deno linter.
The built-in OpenTelemetry feature allows developers to automatically instrument APIs such as console.log, Deno.serve, and fetch, providing a seamless way to capture observability data. Additionally, users can instrument their own code using npm:@opentelemetry/api and provide an OpenTelemetry protocol (OTLP) endpoint to capture the data. For development and test environments, Deno Land recommends using Grafana's LGTM Docker image.
The Deno linter has received a significant upgrade, featuring a new plugin system and 15 rules specifically designed for React and Preact users. These rules include jsx-boolean-value, jsx-button-has-type, and jsx-curly-braces, among others, aimed at improving code quality and reducing errors.
In terms of performance, Deno 2.2 introduces several improvements. The runtime now clears information about module analysis after a timeout, leading to lower memory consumption. Furthermore, Deno.stat and node:fs.stat are now up to 2.5 times faster on Windows, and Node.js module resolution has been optimized by limiting conversions between URLs and paths.
Other notable features in Deno 2.2 include a highly requested node:sqlite module, which simplifies working with in-memory or local databases. The deno lsp tool has also been improved, providing faster and more responsive performance, particularly for web framework users. The deno bench tool has been made more precise, and the deno check tools now respect JSDoc tags and allow compiler options to be configured per workspace member.
Additionally, Deno 2.2 brings performance and quality of life improvements to deno compile, which is now smaller and faster. The release also upgrades to TypeScript 5.7 and features a revamped WebGPU implementation, expected to improve the performance of available APIs.
Existing users can upgrade to Deno 2.2 by running the command deno upgrade, while new users can find installation instructions on the Deno website. With these significant updates, Deno 2.2 is poised to further enhance the development experience for JavaScript and TypeScript developers.
The release of Deno 2.2 demonstrates the Deno team's commitment to providing a robust and efficient runtime environment. As the JavaScript ecosystem continues to evolve, Deno's focus on performance, security, and developer experience is likely to have a significant impact on the industry.