Change8

v2.5.0

Breaking Changes
📦 denoView on GitHub →
1 breaking14 features🐛 8 fixes🔧 18 symbols

Summary

Deno 2.5.0 introduces a runtime API for bundling, setup/teardown hooks for Deno.test, and configuration-based permissions. It also includes significant Node.js compatibility improvements and upgrades to TypeScript 5.9.2 and V8 14.0.0.

⚠️ Breaking Changes

  • The `deno fmt` command now prompts or requires `deno fmt .` when no files are provided and no configuration files are discovered.

Migration Steps

  1. Update scripts using `deno test --nocapture` to use `deno test --no-capture`.
  2. If using `deno fmt` without arguments in CI/scripts, ensure a config file exists or update to `deno fmt .` to avoid interactive prompts.

✨ New Features

  • Added runtime API for `deno bundle`.
  • Support for HTML entrypoints in `deno bundle`.
  • Added setup and teardown APIs to `Deno.test`.
  • Added `tcpBacklog` argument to `Deno.listen`, `Deno.listenTls`, and `Deno.serve`.
  • Support for permissions defined directly in the configuration file.
  • Added permission audit logs.
  • Added collector utilities to `ChildProcess.stdout` and `ChildProcess.stderr`.
  • New lint rules: `no-import-prefix` (workspace) and `no-unversioned-import`.
  • Reload environment variables automatically with `--watch` and `--env-file`.
  • Support for `bundleDependencies` in npm dependencies.
  • Added `sqlite-type` symbol for `DatabaseSync` in Node.js compatibility layer.
  • WebSocket headers field (unstable).
  • Use Node.js implementation for `setTimeout` and `setInterval` (unstable).
  • Running `deno run` with no arguments now prints a list of available tasks.

🐛 Bug Fixes

  • Fixed regression where Node fs APIs required elevated permissions on Windows.
  • Fixed `crypto.hkdfSync` returning wrong results for non-Uint8Array TypedArray inputs.
  • Fixed `fs.exists`, `fs.mkdtemp`, `fs.symlink`, and `path` utilities for better Node.js compatibility.
  • Fixed `Deno.test` flag from `--nocapture` to `--no-capture`.
  • Resolved conflict when a directory has the same name as a task in `deno run`.
  • Fixed `Readable` adapter cancel semantics in Node.js compatibility layer.
  • Improved TypeScript check support for `rootDirs` and `moduleResolution: "bundler"`.
  • Aligned `crypto.getRandomValues` types with DOM and WebWorker standards.

🔧 Affected Symbols

Deno.testDeno.listenDeno.listenTlsDeno.serveDeno.bundleChildProcess.stdoutChildProcess.stderrDatabaseSynccrypto.getRandomValuescrypto.hkdfSyncfs.existsfs.mkdtempfs.symlinkpath.normalizepath.relativesetTimeoutsetIntervalQuicListener