Change8

Migrating to Deno v2.4.0

Version v2.4.0 introduces 2 breaking changes. This guide details how to update your code.

Released: 7/1/2025

2
Breaking Changes
4
Migration Steps
13
Affected Symbols

⚠️ Check Your Code

If you use any of these symbols, you need to read this guide:

Deno.CommandDeno.execPathDeno.serveDeno.permissionsnode:fs.globnode:fs.globSyncnode:fs.promises.globnode:fs.lchmodnode:streamBufferglobalsetImmediateclearImmediate

Breaking Changes

Issue #1

Deno.fmt now removes UTF-8 BOM instead of maintaining it, which may affect files relying on the byte order mark.

Issue #2

Publishing packages with 'bytes' or 'text' imports is now explicitly disallowed.

Migration Steps

  1. 1
    Replace usage of --unstable-node-globals with standard execution as globals are now built-in.
  2. 2
    Update scripts using --unstable-node-conditions to use --unstable-conditions.
  3. 3
    Update scripts using --unstable-sloppy-imports to use --sloppy-imports.
  4. 4
    Ensure any packages intended for 'deno publish' do not use the new 'bytes' or 'text' import attributes.

Release Summary

Deno 2.4.0 introduces the 'deno update' subcommand, stabilizes OpenTelemetry support, and adds support for text/bytes imports. It also improves Node.js compatibility by adding missing fs APIs and making Buffer and immediate timers global.

Need More Details?

View the full release notes and all changes for Deno v2.4.0.

View Full Changelog