Deno 1.46 Enhances CLI and Optimizes Performance
Deno 1.46 marks a significant update in the evolution of the JavaScript/TypeScript runtime, with this version being the final release in the 1.x series. Released on August 22, this upgrade focuses on streamlining the command-line interface (CLI), improving dependency management, and bolstering Node.js/npm compatibility. Additionally, the new release introduces multi-threading capabilities for web servers, giving developers a more efficient way to handle concurrent requests with the new --parallel
flag for the deno serve
command.
One of the standout features in Deno 1.46 is the simplified CLI. This release removes the need to specify the run
subcommand when executing a program, making it easier for developers to run code with minimal input. The changes offer a more ergonomic approach to common tasks, allowing all necessary flags to be passed directly to the deno
subcommand. Another notable ergonomic improvement is the enhanced task-running feature, which simplifies the process of executing tasks via deno run
.
Dependency management also sees significant improvements in this release. Deno 1.46 introduces support for dist tags and the suggestion of npm packages when adding dependencies, making it easier for developers to manage libraries across different ecosystems. Additionally, the deno add
command now provides more helpful feedback when adding npm-only packages, and a new deno remove
subcommand allows for seamless removal of dependencies from configuration and lock files. The deno clean
command has also been added to help purge the global cache of remote dependencies, ensuring more efficient use of storage across multiple projects.
Performance enhancements are another major highlight of Deno 1.46. The Deno.serve()
API has been optimized for a speed boost of 8% to 15%, while the crypto.randomUUID()
function is now five times faster. The deno serve
command also benefits from the newly introduced --parallel
flag, enabling the use of multi-threading for more efficient server performance. Other performance improvements include a 80% faster Response.clone()
method and optimizations to the deno doc
command that reduce memory usage. Furthermore, Deno’s standard library is now considered stable, adding an extra layer of reliability for developers looking to use it in production environments.