Back to blog

Node.js 23 and the New Features Transforming the JavaScript Ecosystem in 2025

Hello HaWkers, Node.js continues to be the number 1 choice for server-side JavaScript development, and version 23 brings changes that will transform how you develop backend applications.

Did you know that more than 85% of modern web applications use Node.js in some part of their stack? And with Node.js 23, this number is expected to grow even more.

The Constant Evolution of Node.js

Since its launch in 2009, Node.js has revolutionized web development by allowing JavaScript developers to create high-performance server-side applications. Version 23, released in October 2024, represents a significant leap in terms of performance, security, and developer experience.

Node.js 23 comes with important updates to the V8 engine (version 12.4), bringing substantial improvements in JavaScript code execution and full support for the latest ECMAScript 2024 features. Additionally, the Node.js team focused on three main pillars: performance, security, and ease of use.

Main highlights of this version:

  • Improved native TypeScript support
  • Enhanced performance in I/O operations
  • Significant improvements in the module system
  • New experimental APIs for edge computing
  • Reinforced security with OpenSSL updates

Native TypeScript Support: Finally!

One of the most anticipated features by the community is the improved support for TypeScript. Although not yet 100% native, Node.js 23 brings substantial improvements that reduce the need for external tools like ts-node or tsx.

// Now you can run TypeScript files directly
// with much less overhead and better performance

// server.ts
import express from 'express';
import type { Request, Response } from 'express';

const app = express();
const PORT = process.env.PORT ?? 3000;

app.get('/api/users/:id', (req: Request, res: Response) => {
  const userId: string = req.params.id;

  // Type safety without prior compilation
  const user = {
    id: userId,
    name: 'Jeff Bruchado',
    role: 'Full Stack Developer'
  };

  res.json(user);
});

app.listen(PORT, () => {
  console.log(`Server running on port ${PORT}`);
});

The improvement in TypeScript support means you can run TypeScript code with performance very close to pure JavaScript, without the need for a complex build step. This is especially useful in development environments and for automation scripts.

Node.js TypeScript integration

Module System: ESM Becomes the Standard

Node.js 23 makes ECMAScript Modules (ESM) the official standard, marking a definitive transition from CommonJS to a more modern module system aligned with browser JavaScript.

// Before (CommonJS - still supported)
const fs = require('fs');
const path = require('path');

module.exports = {
  readConfig: () => {
    return JSON.parse(fs.readFileSync('./config.json', 'utf-8'));
  }
};

// Now (ESM - Recommended standard)
import fs from 'node:fs/promises';
import path from 'node:path';

export async function readConfig() {
  const data = await fs.readFile('./config.json', 'utf-8');
  return JSON.parse(data);
}

// Top-level await now works perfectly
const config = await readConfig();
console.log('Config loaded:', config);

Improved Performance: Faster, Fewer Resources

Node.js 23 brings significant performance improvements, especially in I/O operations and stream handling. Benchmarks show gains of up to 30% in certain operations.

// New streams API with better performance
import { pipeline } from 'node:stream/promises';
import { createReadStream, createWriteStream } from 'node:fs';
import { createGzip } from 'node:zlib';

// Efficient processing of large files
async function compressFile(input, output) {
  try {
    await pipeline(
      createReadStream(input),
      createGzip({ level: 9 }),
      createWriteStream(output)
    );

    console.log('File compressed successfully!');
  } catch (error) {
    console.error('Compression error:', error);
    throw error;
  }
}

// Much superior performance than the previous version
await compressFile('large-file.json', 'large-file.json.gz');

Improvements include:

  • 30% faster in file system operations
  • 25% less memory consumption in high-throughput applications
  • Reduced startup time by up to 40% in certain scenarios
  • Better garbage collection with fewer noticeable pauses

Native Test Runner: Goodbye Jest and Mocha?

Node.js 23 significantly improves its native test runner, introduced in version 18. Now it's more mature and can be a viable alternative to tools like Jest, Mocha, and Vitest.

// test/api.test.js
import { test, describe, it, mock } from 'node:test';
import assert from 'node:assert';

describe('User API Tests', () => {
  it('should create a new user', async () => {
    const mockDb = {
      insert: mock.fn(() => Promise.resolve({ id: 1, name: 'Jeff' }))
    };

    const result = await mockDb.insert({ name: 'Jeff' });

    assert.strictEqual(result.name, 'Jeff');
    assert.strictEqual(mockDb.insert.mock.calls.length, 1);
  });

  it('should handle errors gracefully', async () => {
    await assert.rejects(
      async () => {
        throw new Error('Database connection failed');
      },
      {
        name: 'Error',
        message: 'Database connection failed'
      }
    );
  });
});

// Run with: node --test

Native Watch Mode: Hot Reload Without Nodemon

Finally, Node.js has a native watch mode, eliminating the need for tools like nodemon or node-dev for development.

// Just add the --watch flag
// node --watch server.js

// Node.js will automatically restart when it detects changes
import express from 'express';

const app = express();

app.get('/', (req, res) => {
  res.json({ message: 'Hello from Node.js 23!' });
});

app.listen(3000, () => {
  console.log('Server running on http://localhost:3000');
  console.log('Watch mode enabled - changes will auto-reload');
});

New Features in Fetch API and Web Standards

Node.js 23 continues implementing standard Web APIs, making code more portable between server and client.

// Fully stable Fetch API
const response = await fetch('https://api.github.com/users/jeffbruchado', {
  headers: {
    'Accept': 'application/json',
    'User-Agent': 'Node.js 23'
  }
});

const data = await response.json();
console.log(`GitHub user: ${data.name}`);

// WebStreams API
const readable = new ReadableStream({
  start(controller) {
    controller.enqueue('Hello ');
    controller.enqueue('from ');
    controller.enqueue('Node.js 23!');
    controller.close();
  }
});

const reader = readable.getReader();
let result = '';

while (true) {
  const { done, value } = await reader.read();
  if (done) break;
  result += value;
}

console.log(result); // "Hello from Node.js 23!"

Challenges and Considerations

Although Node.js 23 brings many improvements, there are some points to consider:

1. CommonJS to ESM Migration: The transition can be challenging in large projects with many legacy dependencies still using CommonJS.

2. Breaking Changes: Some old APIs have been deprecated or removed, requiring updates to existing code.

3. Dependency Compatibility: Not all NPM libraries are fully compatible with the new features, especially pure ESM.

4. Learning Curve: The new APIs and patterns require developers to update their knowledge and practices.

5. Production Stability: As it's a recent version, extensive testing is recommended before using in critical production environments.

The Future of Node.js and Backend Development

Node.js 23 represents an important step in the platform's evolution, increasingly aligning with modern web standards and focusing on developer experience. Future versions promise:

  • Full and native TypeScript support
  • Continuous performance improvements
  • Greater compatibility with Web Standards
  • Even better development tools
  • Better integration with edge computing and serverless

Trends for 2025:

  • Massive ESM adoption across the entire ecosystem
  • Consolidation of the native test runner
  • Growth in Node.js usage for edge computing
  • Greater integration with AI and ML tools
  • Performance comparable to compiled languages in specific scenarios

If you feel inspired by the possibilities of Node.js 23, I recommend checking out another article: WebAssembly and JavaScript in 2025: The Integration Revolutionizing Web Performance where you'll discover how to combine Node.js with WebAssembly for extreme performance.

Let's go! 🦅

📚 Want to Deepen Your JavaScript Knowledge?

This article covered Node.js 23, but there's much more to explore in modern development.

Developers who invest in solid, structured knowledge tend to have more opportunities in the market.

Complete Study Material

If you want to master JavaScript from basics to advanced, I've prepared a complete guide:

Investment options:

  • $4.90 (single payment)

👉 Learn About JavaScript Guide

💡 Material updated with industry best practices

Comments (0)

This article has no comments yet 😢. Be the first! 🚀🦅

Add comments