New Features in Recent Node.js Releases (v20–v23)
The article reviews the rapid evolution of Node.js, detailing new security, testing, module, environment, and runtime capabilities introduced from version 20 through 23, while also noting the emergence of competing runtimes Deno and Bun and their impact on the JavaScript ecosystem.
In 2018, Ryan Dahl, the creator of Node.js, launched a new JavaScript runtime called Deno to address longstanding issues in Node.js and to provide enhanced security and modern language features. In 2022, another runtime named Bun appeared, sparking extensive discussion in the developer community.
These emerging runtimes reflect developers' dissatisfaction with the current state of Node.js and their desire for new solutions; however, because of Node.js's massive ecosystem, many developers remain cautious.
Node.js v20.0
Permission Model (experimental) : Allows developers to restrict access to resources such as the file system, child processes, and worker threads during execution.
Native Test Runner : The test_runner module is now stable, providing core testing utilities like describe , it , test , and hooks, and can be invoked with node --test for parallel test execution.
Node.js v20.6
Native .env File Support : Developers can load environment variables directly from a .env file without third‑party modules such as dotenv .
Node.js v21.0
Built‑in WebSocket Client (experimental) : Enabled via the --experimental-websocket flag, offering a browser‑compatible WebSocket implementation.
Experimental Default Module System Switch : The --experimental-default-type flag lets developers toggle the default module system between ES modules and CommonJS.
Node.js v21.7
Built‑in Colored Text Output : console.log can now output colored text using the util.styleText function, removing the need for external libraries like chalk .
Environment Variable Enhancements : process.loadEnvFile(path) loads a specified .env file (or the default one in the current directory). util.parseEnv(content) parses a string containing environment variable assignments.
Node.js v22.0
Watch Mode : The stable node --watch flag automatically restarts the process when watched files change, eliminating the need for tools like nodemon .
Built‑in WebSocket Client (stable) : No longer requires the --experimental-websocket flag and follows the standard browser WebSocket API.
Require() Can Import ESM : Allows using require() to load ES modules, easing migration from CommonJS.
Run Scripts Defined in package.json : The new --run flag lets users execute scripts directly from package.json , providing a faster, standardized alternative to npm run .
Node.js v22.5
Experimental SQLite Support : Includes a built‑in SQLite module so developers can use SQLite databases without external dependencies.
Node.js v22.6
Experimental TypeScript Support : Enabled with --experimental-strip-types , allowing direct execution of .ts files (limited to inline type annotations and without tsconfig.json support).
Experimental Network Inspection : The --experimental-network-inspection flag provides basic monitoring of network activity for the http and https modules.
Node.js v23.0
Native ES Module Support via require() : Developers can now load ES modules using require() without additional tooling.
Dropping 32‑bit Windows Support : Node.js no longer supports 32‑bit Windows, focusing on modern environments.
Conclusion
Node.js has been aggressively adding modern features, and its continued evolution is complemented by the rapid rise of Bun and Deno. The competition among these runtimes accelerates innovation across the JavaScript ecosystem.
IT Services Circle
Delivering cutting-edge internet insights and practical learning resources. We're a passionate and principled IT media platform.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.