Deno 2.6: dx is the new npx
Deno 2.6 adds `dx`, an npx equivalent for running npm and JSR package binaries that defaults to full permissions, prompts before download and runs lifecycle scripts.
Deno 2.6 adds `dx`, an npx equivalent for running npm and JSR package binaries that defaults to full permissions, prompts before download and runs lifecycle scripts.
Recent npm compromises (@ctrl/tinycolor via a malicious postinstall script, and debug/chalk via phishing) exploited Node and npm's default of giving every dependency full access to the filesystem, network and environment.
Deno now recommends importing npm packages with native `npm:` specifiers instead of HTTP transpile services like esm.sh or unpkg.
Deno 2 adds `deno add`, `deno remove`/`uninstall`, and `deno install` subcommands that manage npm and JSR dependencies in either `deno.json` import maps or an existing `package.json`, so they work inside Node projects too.
JSR, the JavaScript Registry, is in public beta as a free, MIT-licensed, ESM-only registry built for TypeScript that works with Deno and npm-based runtimes like Node, Bun and Cloudflare Workers.
Deno 1.28 stabilizes npm compatibility, letting programs import any of npm's 1.3 million packages via `npm:` specifiers in imports or import maps, and run npm CLIs with `deno run npm:<pkg>`, with no package.json, install step or node_modules folder by default.