Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Deno 6 min read Opinion easyNovice

What we got wrong about HTTP imports

Deno's original module system of direct HTTP URL imports didn't scale. Long URLs cluttered code, `deps.ts` files were clumsy, exact version pinning in URLs led to duplicate copies of the same library, and builds depended on the uptime of every host in the dependency graph. Deno is keeping HTTP imports but now recommends import maps for short specifiers and central version management, plus JSR, a semver-aware registry that resolves `jsr:` specifiers to immutable HTTP URLs. That design keeps granular file downloads and fixes deduplication and reliability. These changes are a core part of Deno 2.

Assumes: ES modulessemantic versioningnpm package management

Related posts

  • Why We Added package.json Support to Deno

    Deno easyNovice

    Deno 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.

  • Announcing Deno 2

    Deno easyNovice

    Deno 2 adds backwards compatibility with Node.js and npm, so it runs existing Node projects using package.json, node_modules and npm workspaces, and supports npm: import specifiers without a manifest. It also adds package management commands (deno install/add/remove, claimed 15% faster than npm on a cold cache and 90% faster on a hot cache), private registries via .npmrc, workspaces and monorepos, a stabilized standard library on JSR, and an LTS channel starting with 2.1 that gets six months of backported fixes. Toolchain updates include multi-core deno serve, HTML/CSS/YAML formatting and node:test support. A correction notes HTTP throughput is about 20% lower than charted because V8 pointer compression was disabled to lift the 4GB heap limit.

  • If you're not using npm specifiers, you're doing it wrong

    Deno mediumAdept

    Deno now recommends importing npm packages with native `npm:` specifiers instead of HTTP transpile services like esm.sh or unpkg. Those services lack semver-aware deduplication, so duplicate copies of React can load, and they can't run install hooks for native add-ons or serve bundled data files. Native `npm:` imports resolve versions properly and need no node_modules or package.json, since packages go to a global cache. They also work in Jupyter and the REPL, fall under Deno's permission model with opt-in `--allow-scripts`, and support private registries via `.npmrc`.

  • The Deno Standard Library is now available on JSR

    Deno mediumAdept

    Deno's Standard Library has moved from deno.land/std to JSR at jsr.io/@std, split into 37 independently versioned packages such as @std/fs and @std/path. Each package can then be stabilized on its own schedule, with @std/bytes and @std/collections the first candidates. Packages install via `deno add`, or into Node.js, Cloudflare Workers and bundlers through `npx jsr add`. About 70% are Node-compatible, and all are ESM-only. deno.land/std stays available but will get only critical fixes, and migration means upgrading to 0.224.0 and then swapping HTTP imports for jsr: specifiers. The repo uses Deno's new workspaces feature for local cross-package dependencies.

  • Deno 1.19 Release Notes

    Deno mediumAdept

    Deno 1.19 adds `deno vendor`, which builds a module graph from entrypoints, writes remote dependencies into a `vendor/` folder with readable paths, and generates an import map so programs can run with `--no-remote`. Permission checks now prompt interactively on a TTY instead of throwing. Files, sockets and stdio expose `readable`/`writable` web streams that compose with `fetch`, the HTTP server and the new `CompressionStream`/`DecompressionStream`. `deno compile` now embeds the unbundled ES module graph via eszip so execution order and `import.meta.url` are preserved, and test sanitizers report leaked resources and async ops with clear messages and stack traces.

The quest for software engineering knowledge.

Look:
Layout: