MacMusic  |  PcMusic  |  440 Software  |  440 Forums  |  440TV  |  Zicos
deno
Search

Deno 1.46 simplifies CLI

Monday August 26, 2024. 10:51 PM , from InfoWorld
Deno Land has released Deno 1.46, which the company says is the final 1.x release of the JavaScript/TypeScript runtime. The upgrade simplifies the command-line interface, improves dependency management and Node.js/npm compatibility, and enables multi-threaded web servers with a new --parallel flag for the deno serve command.

Deno 1.46 was announced August 22. To upgrade to Deno 1.46 developers can run the deno upgrade command in their terminal.

The CLI (command line interface) in Deno 1.46 introduces shorter invocations to offer a more ergonomic method for performing common tasks. Developers now can run a program with deno and do not have to specify the run subcommand. All necessary flags still can be passed to the deno subcommand. Another ergonomic change is an ability to run tasks via deno run.

Dependency management improvements include supporting dist tags and suggest npm packages. Developers now can use dist tags when adding npm dependencies. Also, deno add now will provide a helpful message when trying to add a package from JSR that only is available on npm. With deno remove, Deno now has a subcommand to remove a dependency from the config and lockfile. And developers can invoke a deno clean to purge the global cache used to store remote dependencies for efficient use across multiple projects.

Deno 1.46 boosts the performance of the Deno.serve() API by 8% to 15% while crypto.randomUUID() is five times faster, according to Deno Land. Further, deno serve now supports a --parallel flag that runs the server on multiple threads. Also, Response.clone() is 80% faster and deno doc has been optimized to improve memory usage. And the standard library in Deno 1.46 now is stable.

With Deno 1.46 having now arrived, a first release candidate of Deno 2 is expected shortly. Deno 2 will have some “minor” breaking changes, including API changes and deprecations. Other improvements in Deno 1.46 include:

The deno serve subcommand, for writing servers in a declarative way, has been made faster.

Improvements have been made to deno test and deno coverage, which now show breadcrumbs for easier navigation.

Compatibility with Node.js and npm packages has been improved, with Deno 1.46 focusing on getting several popular packages working. For example, Playwright is now supported on Linux and macOS.

The deno fmt command now can be used to format HTML, CSS, SCSS, Sass, Less, YAML, Astro, Angular, Svelte, and Vue files.

Google’s V8 12.9 JavaScript and WebAssembly engine now ships with Deno.
https://www.infoworld.com/article/3496327/deno-1-46-simplifies-cli.html
News copyright owned by their original publishers | Copyright © 2004 - 2024 Zicos / 440Network
Current Date
Nov, Thu 21 - 12:55 CET