Navigation
Search
|
Deno 2.3 adds compile improvements, support for local NPM packages
Sunday May 4, 2025. 06:50 PM , from InfoWorld
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.
https://www.infoworld.com/article/3976654/deno-2-3-adds-compile-improvements-support-for-local-npm-p...
Related News |
25 sources
Current Date
May, Tue 6 - 17:41 CEST
|