Deno boosts dependency management with JSR

Deno 1.42, the latest release of the JavaScript, TypeScript, and WebAssembly runtime, introduces support for JSR, a new package registry for JavaScript and TypeScript. The release also improves Node and NPM compatibility and startup times.

Deno 1.42 was announced March 28. Users can upgrade in their terminal by running the deno upgrade command.

Deno 1.42 allows users to consume and publish modules to the JSR package registry directly from Deno, using the deno add and deno publish subcommands. At the same time, Deno continues to support NPM. JSR offers a modern, TypeScript-first and cross-platform-compatible registry, integrated into Deno, Deno’s developers said.

For Node.js and NPM compatibility, Deno 1.42 offers numerous improvements. The async_hooks module now supports the EventEmitterAsyncResource and AsyncLocalStorage.enterWith APIs. The crypto module adds getRandomValues(), subtle, getCipherInfo(), publicKey(), and createPublicKey() APIs, along with support for more curves in multiple APIs. The worker_threads module received a major overhaul.

Deno 1.42 also addresses an issue with deno run --check, which previously could potentially type-check part of the way through execution when encountering a statically unanalyzable dynamic import or starting a worker. Deno’s developers said this feature had a large maintenance burden, posed challenges with JSR, and potentially could result in a running application failing partway through execution. Therefore, type-checking no longer occurs after the initial type check. The developers recommend using the deno check subcommand to type check these modules.

Deno 1.42 offers a faster startup time, with a 10% improvement on Linux. Bootstrap initialization now is warmed up during snapshot time and reduced memory allocations. And a new environment variable, DENO_FUTURE=1, allows you to enable changes that will take place in Deno 2.0.

Deno 1.42 ships with the V8 12.3 JavaScript engine and TypeScript 5.4.3.

Copyright © 2024 IDG Communications, Inc.


This website uses cookies. By continuing to use this site, you accept our use of cookies.