Deno 1.34: deno compile supports npm packages
Deno 1.34 lets `deno compile` bundle npm packages and their dependencies into a single self-contained executable. That makes tools like vite and eslint shippable as binaries with pinned dependencies, and they tend to start faster than running from a local cache. The release also adds cross-platform glob support in deno.json, deno task and CLI flags, and TLS certificates with IP addresses via rustls. Smaller changes include a top-level `exclude` and `nodeModulesDir` in config, configurable language-server limits, a `Deno.serve()` signature change that returns a `Deno.Server`, new `createHttpClient` pool options, more Node.js polyfills, and upgrades to V8 11.5 and TypeScript 5.0.4.
Related posts
- Deno 2.3: Improved deno compile, local npm packages, and more
Deno mediumAdeptDeno 2.3 lets deno compile bundle programs that use FFI and Node native add-ons, adds --include/--exclude control over embedded files, and exposes Deno.build.standalone to detect compiled binaries. Local npm packages can now be used through a "patch" entry in deno.json. deno fmt gains formatting of CSS, HTML and SQL in tagged templates plus 14 new options, and OpenTelemetry support adds span events, cross-service context propagation, node:http auto-instrumentation and V8 heap metrics. deno install is about 2x faster when npm dependencies are cached, thanks to in-memory npm metadata caching and lockfile v5, with a benchmark showing 2.5x on a Vite React template. The release also adds the JavaScript `using` keyword, coverage ignore comments and TypeScript 5.8 with V8 13.5.
- Deno 1.32: Enhanced Node.js Compatibility
Deno mediumAdeptDeno 1.32 improves Node.js compatibility by installing npm packages only when a bare specifier matches package.json, surfacing package.json errors lazily, adding DENO_NO_PACKAGE_JSON, and supporting createCipheriv/createDecipheriv in node:crypto. `deno compile` now handles dynamic imports and Web Workers, bundling statically analyzable specifiers automatically and others via a new --include flag. The release also adds --ext for running extensionless files, removes unstable WebGPU to cut binary size and startup time, moves std/encoding modules to top-level paths, and upgrades to TypeScript 5.0 (over 2x faster initial type-check when skipping remote modules) and V8 11.2. Users of 1.32.0 should upgrade to 1.32.1 due to a critical security issue.
- Deno 2.4: deno bundle is back
Deno mediumAdeptDeno 2.4 brings back `deno bundle`, now built on esbuild, producing single-file bundles for Deno or browser targets with tree shaking, minification, sourcemaps and npm/JSR dependency support. Text and bytes imports via import attributes (behind `--unstable-raw-imports`) let assets be embedded in bundles and `deno compile` binaries. Built-in OpenTelemetry is now stable, and the release adds a `--preload` flag, a `deno update` command, `deno run --coverage`, a `DENO_COMPAT=1` mode for package.json-first projects, and conditional package.json exports. `--allow-net` gains subdomain wildcards and CIDR ranges, a new `--deny-import` flag blocks specific hosts, and `Deno.execPath()` no longer requires read permission, which avoids pushing users toward a blanket `--allow-read`.
- Deno 2.9
Deno mediumAdeptDeno 2.9 introduces experimental `deno desktop`, which compiles a web UI plus Deno logic into a single native binary using either the OS webview or bundled Chromium via CEF, with native window, tray and dock APIs and cross-compilation to installers for all five targets. `deno install` now seeds `deno.lock` from npm, pnpm, yarn and Bun lockfiles with exact versions and hashes, migrates pnpm workspace config, and shims `node` for tools that shell out to it. Cold start drops from 34ms to 17ms through lazy-loaded Node globals, V8 code caching and a minified snapshot. A new Rust HTTP/1.1 path raises `Deno.serve` throughput 11–27% and cuts peak RSS by 2.2–3.1x. The release also adds CSS module imports, `deno link`/`deno list`, JSR packages in node_modules and automatic lockfile merge-conflict resolution.
- Self-contained Executable Programs with Deno Compile
Deno mediumAdept`deno compile` turns JavaScript and TypeScript programs into standalone binaries for Windows, macOS and Linux that run without Deno installed. It works by bundling the module graph into an eszip file and injecting it with Sui into a slimmed-down runtime binary, denort. Because the bundle sits in a section of the executable, the result can still be code signed. Examples cover cross-compiling with `--target`, custom icons, preserved permission flags, and compiling npm itself, which ran about 1.9x faster on `npm -v`. Assets can be embedded as base64-encoded modules until native asset bundling arrives.