Paul Krill
Editor at Large

Deno 1.46 simplifies CLI

news
Aug 26, 20243 mins

Last 1.x release of the runtime for JavaScript and TypeScript also improves dependency management and stabilizes the standard library.

shutterstock 1591493512 dinosaur roadside attraction brontosaurus T Rex clouds blue sky
Credit: The Image Party / Shutterstock

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.
Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author