1 of 12

Deno v2.1

Sneak peak

2 of 12

Wasm imports

import { exported_add } from "./add.wasm";

console.log(`exported_add: ${exported_add(4, 5)}`);

Works in deno run, deno compile and more.

Prerequisite for bytes and text imports

3 of 12

Stack trace in permission prompt

Show a JavaScript stack trace when a permission is requested

Requires DENO_TRACE_PERMISSIONS env var as it incurs a significant overhead. Works in all subcommands.

https://github.com/denoland/deno/pull/25502

4 of 12

deno update and deno outdated

Update jsr and npm dependencies from the command line

Highly requested!

https://github.com/denoland/deno/pull/26219

5 of 12

Better CommonJs support

Run existing Node.js projects using CommonJs, with a single line change:

// package.json

{

“type”: “commonjs”

}

// main.js

const hello = require(“./hello”);

hello();

$ deno main.js

Hello world

https://github.com/denoland/deno/pull/26439

6 of 12

deno task workspace and dependency support

Equivalent to https://pnpm.io/cli/recursive and https://pnpm.io/filtering (https://github.com/denoland/deno/issues/24991)

Support for “object notation” for tasks, with a “dependency” setting to run other tasks as prerequisites, similar to https://github.com/google/wireit. Requested by PatrickJs

https://github.com/denoland/deno/pull/26467

7 of 12

deno compile 🚀

Support for V8 code cache, making it twice as fast

https://github.com/denoland/deno/pull/26528

8 of 12

deno coverage ignores

  • // deno-coverage-ignore-file
  • // deno-coverage-ignore-next
  • // deno-coverage-ignore-start
  • // deno-coverage-ignore-stop

Makes Deno more capable and feature par with tools like nyc or istanbul

https://github.com/denoland/deno/pull/26590

9 of 12

--unstable-node-globals flag

Makes globals like Buffer, global and more available by default for even more enhanced backwards compatibility.

https://github.com/denoland/deno/pull/26617

10 of 12

--allow-env wildcards

Allow access to scoped env vars:

--allow-env=AWS_*

--allow-env=DENO_*

--allow-env=MYCOMPANY_*

https://github.com/denoland/deno/pull/25255

11 of 12

Built-in tracing/OTEL support

Deno.tracing namespace that integrates seamlessly with OTEL libraries using https://jsr.io/@deno/otel

fetch API instrumented by default. Instrument a couple more APIs before 2.1 release.

https://github.com/denoland/deno/pull/26710

12 of 12

Easier npm create equivalent

deno init npm:svelte

Implies read, write, env, run permissions. Makes the invocation 50% shorted.

https://github.com/denoland/deno/issues/26461