Paul Krill
Editor at Large

Deno 2.3 adds compile improvements, support for local NPM packages

news
May 4, 20253 mins
JavaScriptNode.jsTypescript

Improvements to deno compile allow compiled binaries to include and work with native libraries or Node plug-ins.

shutterstock 1108024643 Sauropods dinosaur in tropical landscape
Credit: thaloengsak / Shutterstock

Deno Land has released Deno 2.3, an update of the company’s JavaScript and TypeScript runtime that brings improvements to deno compile and adds support for local NPM packages.

Announced May 1, Demo 2.3 extends deno compile to support programs that use Foreign Function Interface (FFI) and Node native add-ons. This means compiled binaries can include and work with native libraries or Node plug-ins. Also, deno compile now can exclude specific files from being embedded during the compilation process. This offers more control over which files get packaged into a standalone executable. With deno compile, developers can compile a project into a single binary, allowing them to distribute ready-to-run programs without having to install Deno or dependencies.

Deno 2.3 also introduces a Deno.build.standalone boolean to indicate if the code is running in a self-contained compiled binary. This can be useful for error reporting, feature toggling, user messaging, and more, in build-specific environments, according to Deno Land.

Deno 2.3 adds support for using local NPM packages, making testing and developing an NPM package locally possible. To use local NPM modules, developers need a local node_modules folder, which can be achieved with either "nodeModulesDir": "auto" or "nodeModulesDir": "manual". The "manual" option requires running deno install each time the local npm package is updated.

Installation instructions for Deno can be found at docs.deno.com. To upgrade to Deno 2.3, developers can run the following in their terminal: deno upgrade.

Other features in Deno 2.3 include the following:

  • Improvements to deno fmt allow developers to format embedded CSS, HTML, and SQL in tagged templates.
  • A new way is provided to install packages from NPM and JSR with the addition of registry flags --npm and --jsr, respectively.
  • OpenTelemetry support has been expanded with basic event recording, span context propagators, node:http auto-instrumentation, and V8 JS engine metrics.
  • The deno executable now is signed on Windows, making Microsoft Defender trust Deno.
  • Installing dependencies with deno install and deno add now are about two times faster in most situations where npm dependencies have been cached.
  • Deno 2.3 improves on the Visual Studio Code Jupyter experience by ensuring that variables, modules, and type definitions are shared between Jupyter cells.
  • Deno 2.3 upgrades to  TypeScript 5.8 and V8 13.5 offer new language features and performance.

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

  翻译: