github denoland/deno v2.2.9

latest releases: v2.2.10, v2.1.12
5 days ago

Upgrade

deno upgrade

Or install for the first time

curl -fsSL https://deno.land/install.sh | sh

deno compile fixes

Two fixes make the deno compile tool more robust. First, a bug causing a panic when a node_modules directory was included during compilation was fixed (#28782). Previously, running deno compile in a project with a node_modules folder could crash the compiler; now it handles such folders gracefully without errors. Second, on Windows, executable icons are embedded correctly when using the --icon option (#28771). Deno now preserves the proper resource ordering for multi-resolution .ico files, so compiled .exe files will display their icon in all sizes as expected. Together, these improvements make Deno’s single-binary compilation more reliable across different project structures and platforms.

Node.js Compatibility Enhancements

This release brings a host of improvements to Deno’s Node compatibility layer, implementing missing APIs and fixing inconsistencies:

  • File System Streams: The fs/promises FileHandle class now supports the .createReadStream() and .createWriteStream() methods (#28700).
  • Command-Line Parsing: The experimental util.parseArgs() API now correctly supports negated flags (the --no- prefix) via its allowNegative option (#28811).
  • Buffer APIs: Deno implements the new Buffer.copyBytesFrom() static method (#28829) and ensures that cipher methods return a Node Buffer object (#28826).
  • Crypto Algorithms: SHAKE-128 and SHAKE-256 algorithm names are now aliased with hyphenated forms (#28451).
  • Process and OS: Implements process.loadEnvFile(path) (#28824) and a working .reset() on the event loop delay histogram (#2888).
  • Streams and Zlib: stream.finished() now supports Web Streams (#28600); zlib errors are more descriptive (#28831).
  • Child Processes: spawnSync now accepts the input option (#28792).

npm and Package Management Fixes

  • Handle missing "bin" in package.json by using registry metadata (#28822).
  • Fix regression where postinstall scripts without extensions were skipped (#28786).
  • Unstable ability to load npm resolution snapshot directly from lockfile for faster startup (#28647).

Task Runner Shell Features

deno task now supports backticks and tilde (~) expansion (#28832). For example:

{
  "tasks": {
    // outputs to a file with a path like: /home/user/logs/2025-04-12T01:38-04:00.log
    "build": "deno job.ts > ~/logs/`date -Im`.log"
  }
}

Developer Tools (LSP & Linting)

  • Filter out unmapped npm cache paths from auto-imports (#28841).
  • Add decorators to the lint AST (#28834), fix parent types (#28802), and group traversal (#28803).

Crash Reporting & Symbolication Bug Fixes

This patch release includes fixes for issues introduced by the new panic.deno.com crash reporting system added in recent versions. On macOS, the Deno binary now preserves Node API (N-API) symbols that were previously stripped out as part of the size reduction effort (#28800). This resolves a regression where native Node addons loaded via process.dlopen() could fail to load. It also ensures that native panics involving these symbols can still be properly symbolicated.

In addition, canary panic URLs now include the full Git commit SHA (#28819), improving reliability of remote symbolication for nightly builds. These changes fix rough edges in the new crash reporting pipeline and restore compatibility with common use cases.

Other Notable Fixes

  • Fix integer overflow in createImageBitmap() (#28764).
  • Upgrade embedded libffi to 4.0.0 (#28816).

Don't miss a new deno release

NewReleases is sending notifications on new releases.