Deno 1.19, the latest release of the secure JavaScript and TypeScript runtime, introduces a number of significant updates designed to enhance developer experience and functionality. Notably, this version extends native web stream support, enabling more seamless integration across various Deno APIs. The new update introduces web stream capabilities to files, network sockets, and standard input/output (stdio). In practice, this means that the Deno.FsFile and Deno.Conn interfaces now include readable and writable properties that are of type ReadableStream and WritableStream. This enhancement simplifies the process of working with streams in Deno, making it easier to integrate with other web APIs that also rely on web streams.
With web streams now supported across all core Deno APIs, including its native HTTP server, developers can more easily compose different APIs together in a unified way. This added flexibility is one of the key benefits of the update, as it opens up new possibilities for handling streams of data efficiently. Additionally, Deno 1.19 introduces two new built-in transformers: CompressionStream and DeCompressionStream. These transformers allow developers to compress and decompress data in various file formats, with initial support for gzip and deflate. The CompressionStream API, which is already available in Chrome and is expected to roll out in other browsers soon, provides a convenient and standardized way to manage data compression directly within web applications.
Another notable feature in Deno 1.19 is the introduction of the deno vendor
subcommand, which allows developers to vendor (bundle and lock down) dependencies directly within their code repositories. By invoking the deno vendor
subcommand with one or more module entry points, Deno constructs a module graph by analyzing the imports and exports of the selected modules. The resulting dependencies are then stored in the vendor/
folder, with filenames that closely resemble their original names. This new functionality comes in response to user feedback, which indicated a desire for a straightforward way to manage and package dependencies for Deno applications.
The vendor command is particularly useful for developers who wish to ensure that their applications always use specific versions of dependencies, regardless of changes to those modules in external repositories. By vendoring dependencies directly within the project, developers can avoid potential issues that arise from updating third-party code and guarantee that only intended modules are executed by their application. This approach offers additional stability and control, making Deno 1.19 a more robust choice for developers looking for secure, manageable, and flexible runtime environments.