4 min read
|
Saved February 14, 2026
|
Copied!
Do you care about this?
This article explores the development of module specifiers in JavaScript, focusing on transitions from CommonJS to ECMAScript Modules and the introduction of various protocols like node:, https, and npm. It highlights the complexities and compatibility issues between Deno and Node.js over the years.
If you do, here's more
The article outlines the evolution of module specifiers and protocols in JavaScript, particularly focusing on Deno and Node.js. It starts with the transition from CommonJS to ECMAScript Modules, highlighting the introduction of the `node:` protocol in Node.js in 2021. This protocol helps avoid naming conflicts between built-in Node modules and user-installed NPM modules by enforcing a clear distinction. While Node.js still supports the traditional import method, there are linter rules encouraging the use of the new protocol for better clarity.
Deno, created by Node's founder Ryan Dahl, has taken a different approach. Initially, it emphasized HTTP imports when it launched, but by 2022, it introduced the `npm:` protocol to support the widely-used NPM ecosystem. The article explains that Deno's support for `package.json` in 2023 further aligned it with Node.js, allowing for shared import syntax. However, Deno also introduced the `jsr:` protocol in 2024 as an alternative to NPM, though its advantages remain unclear in the community.
The current state of module specifiers is complex. As of December 2025, Deno supports multiple import methods, including `npm:`, `jsr:`, and standard imports, while Node.js primarily uses the `node:` protocol. The article includes a chart comparing the support for various libraries like Axios across different platforms, revealing inconsistencies and gaps. The author emphasizes the importance of this ecosystem for developers, particularly those in environments like Val Town, where HTTP imports were previously favored but are now criticized for their limitations.
Questions about this article
No questions yet.