Introducing your new JavaScript package manager: Deno
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. Installs use a global cache with hard links (Linux) or clonefile (macOS), like pnpm, to save disk space and speed up installs, and `--entrypoint` can pre-cache dependencies for Docker builds. Postinstall scripts are blocked by default and must be allowed per package with `--allow-scripts`. `deno outdated` and `deno update` are planned for the next release.
Related posts
- Deno 2.6: dx is the new npx
Deno mediumAdeptDeno 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. It also adds `--ignore-read`/`--ignore-env` flags that return NotFound/undefined instead of NotCapable errors, plus an experimental permission broker process for mediating permission requests. Other changes include opt-in type checking with the Go-based tsgo (about 2x faster on internal projects), Wasm source phase imports, `--require` for preloading CommonJS, and `deno audit` with optional socket.dev integration. Supply-chain controls include `deno approve-scripts` and a `minimumDependencyAge` setting, alongside bundler fixes, default `@types/node`, and many Node.js API compatibility fixes.
- Deno 1.28: Featuring 1.3 Million New Modules
Deno mediumAdeptDeno 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. Deno's opt-in permission prompts restrict what npm dependencies can access, though post-install scripts, `deno compile` and some Node-layout assumptions remain unsupported. The release also auto-discovers and additively updates a `deno.lock` file whenever a deno.json config exists, stabilizes APIs such as `Deno.bench()` and `Deno.networkInterfaces()`, adds an unstable unified `Deno.Command` subprocess API replacing the `Deno.spawn` family, and upgrades to V8 10.9.
- Why We Added package.json Support to Deno
Deno easyNoviceDeno added package.json support because its HTTP-import module system, though decentralized and manifest-free, suffers from the Duplicate Dependency Problem, the clunky deps.ts pattern, non-composable import maps, and the limits of transpile servers like esm.sh. Bare specifiers with semver resolution solve deduplication, so Deno now runs existing Node projects while keeping safeguards such as node: prefixes, no arbitrary post-install scripts and permission enforcement. The next major release plans a deno: URL scheme with semver resolution (e.g. deno:oak@12) and encourages import maps in deno.json that mix deno: and npm: specifiers.
- Deno 1.29: Custom npm registry support
Deno mediumAdeptDeno 1.29 adds custom npm registry support via the NPM_CONFIG_REGISTRY environment variable, lets npm specifiers work with `deno install` (with an auto-generated lockfile), and enables npm imports in the REPL. `deno repl` now starts with no permissions by default. The release also removes the unstable Deno.spawn APIs in favor of a unified Deno.Command API, with migration examples, and adds a `createNew` write option and a new `--inspect-wait` debugger flag. Other changes include better errors for unresolved top-level await promises, TypeScript 4.9, and a move toward single-export module layout in std.
- Deno 2.0 Release Candidate
Deno mediumAdeptDeno 2.0's release candidate is the largest update since 1.0: it removes the `window` global, adds Node's `process` global, and deprecates `deno cache` in favor of `deno install`. Dependency management gains subpath support in `deno add`, required `jsr:`/`npm:` prefixes, writing npm deps to package.json (including `--dev`), `deno remove`, `deno install --entrypoint`, and a more concise v4 lockfile. Missing Deno permissions now raise `Deno.errors.NotCapable` instead of `PermissionDenied`, so they can be told apart from OS errors. `--allow-hrtime` is gone, and `--allow-run` warns without an allow list and requires full permission when `LD_*`/`DYLD_*` env vars are set. WebGPU, FFI and `createHttpClient` are stabilized, many legacy `Deno.*` APIs and resource IDs are removed, and `deno bundle` and `deno vendor` are dropped.