Node.js 27.0.0-alpha.0.2.0: Built-in node:sqlite Goes Stable and --process-timeout Leaves ExperimentalArticle · digest for November 27
Engineering still life with a mechanical keyboard, a notebook showing a node:sqlite diagram, and a terminal displaying the process-timeout flag
Article4 sections≈ 8 min

Node.js 27.0.0-alpha.0.2.0: Built-in node:sqlite Goes Stable and --process-timeout Leaves Experimental

You can now open a local SQLite database in Node.js without better-sqlite3, node-gyp, or compiling C++ code after every runtime update, and without passing an experimental flag. In Node.js 27.0.0-alpha.0.2.0, released on November 26, 2026, the built-in node:sqlite module has been marked stable.

Branch 27 is still in alpha, so it's too early for production servers. This build is meant for testing and preparing your codebase for the upcoming release. Even so, the direction is clear. Alongside a mature SQLite module, this release graduates the stuck-process timeout, closes an old TLS loophole, and speeds up URL parsing and streams.

Official release banner for Node.js 27.0.0-alpha.0.2.0 (Source: Node.js Blog)

Stable node:sqlite: Goodbye node-gyp, Hello Permission Model

Anyone who has moved a CLI tool or small service using SQLite across macOS, Linux, and Windows knows the pain. You update Node.js, and better-sqlite3 or sqlite3 fails to build because the binary ABI changed and no prebuilt binary exists for your system. The built-in node:sqlite module spent over two years in Experimental and Release Candidate status. In PR #67654, it moved to Stability: 2 - Stable, and the experimental notice was removed from --no-experimental-sqlite.

Along with stable status, the team added three practical features. First is the statement.columnCount getter, which wraps sqlite3_column_count(). It tells you right away how many columns a prepared statement will return. If you're writing a wrapper or an interactive console for arbitrary SQL, you can check columnCount > 0 before execution to know whether to expect rows or an INSERT/UPDATE.

import { DatabaseSync } from 'node:sqlite';

// Open a local DB file with no third-party drivers
const db = new DatabaseSync('./tasks.db');
db.exec(
  'CREATE TABLE IF NOT EXISTS tasks (id INT, title TEXT)'
);

// Check if the query returns rows before running it
const stmt = db.prepare(
  'SELECT id, title FROM tasks WHERE id = ?'
);
if (stmt.columnCount > 0) {
  console.log(stmt.all(1));
}

Previously, checking this meant parsing the start of the SQL string with a regex. Now the engine answers in a single call. The update also fixes minor bugs: an empty ArrayBuffer now binds as an empty BLOB, and closing a database finalizes all open statements automatically without crashing on repeated resets.

The second improvement integrates SQLite with the Permission Model in PR #62957. The Permission Model is Node.js's built-in sandbox, where scripts get explicit disk access via --allow-fs-read and --allow-fs-write. Previously, SQLite had a gap here: even if the path was checked on open, a database could attach another file via ATTACH DATABASE, write to WAL/SHM journals, or swap the file layer using the vfs= URI parameter.

In this alpha, a new VFS layer checks every SQLite disk operation, including ATTACH and backups. Read-only databases require --allow-fs-read on open(), writable ones need both flags, and :memory: databases bypass the check. Granting access to the main file also covers its companion WAL, SHM, and journal files, while vfs= URI parameters are rejected outright.

The third detail is an explicit ERR_NO_SQLITE error. If Node.js was compiled without SQLite support, your code gets a clear error instead of a mysterious crash.

The scope limit remains the same: the standard library only includes synchronous DatabaseSync, with no async API yet. For CLIs, local caches, and small services, that's more than enough. However, if a web server handles hundreds of requests and runs heavy queries over a gigabyte-sized database, synchronous calls will block the event loop. In that case, move the work to a Worker or use a client-server database.

--process-timeout Leaves Experimental: Catching Stuck Workers

It's a familiar CI headache: tests pass, the script looks finished, yet the Node.js process hangs for ten minutes until the runner kills it with SIGKILL. You get no stack trace and no clue what happened.

The --process-timeout flag solves this, and in this alpha it leaves experimental status. When the timer expires, Node.js exits with code 124 and prints to stderr what kept the main thread's event loop alive.

The trickiest hangs usually hide in worker_threads. PR #67712 adds a separate --process-timeout-worker-stacks flag (Stability: 1.1, active development). It inspects hangs across every worker, including nested ones. For an infinite while (true) {}, stderr prints the JS stack inside that thread. For a forgotten setTimeout(() => {}, 10000), it prints Resources keeping its event loop alive: Timeout (next due in 9028ms). It lives behind a separate flag so dozens of workers don't flood your logs with walls of stack traces.

# Run a script with an SQLite sandbox and a timeout
node --permission \
  --allow-fs-read=./tasks.db \
  --allow-fs-write=./tasks.db \
  --process-timeout=5s \
  --process-timeout-worker-stacks \
  app.js

Combined like this, a local tool or CI job gets double protection: the sandbox keeps SQLite inside tasks.db, while the five-second timeout stops a hung run with exit code 124 and points straight to the culprit in the log.

Cleaning Up Corners: Saying Goodbye to TLS Renegotiation and util.TextDecoder

Two legacy features are on the chopping block in the Node 27 alpha. First is security: PR #67532 announces documentation deprecation for TLS renegotiation. This TLS 1.2 mechanism (removed in TLS 1.3) lets peers renegotiate keys or certificates mid-connection. Changing rules on the fly can silently alter authorization state during an HTTP request, which has led to repeated CVEs.

Both tls.createServer() and tls.connect() now accept an allowRenegotiation option. Nothing breaks immediately, but later in the 27.x line the default will flip to false. Removal of three of the four scenarios is planned no earlier than Node.js 28, leaving only client opt-in for legacy servers. The release also backports a pending-read fix in http for CVE-2026-105481.

The second cleanup affects more projects: util.TextDecoder and util.TextEncoder are now deprecated. Global TextDecoder and TextEncoder have been built into Node.js for years, so importing them from node:util is no longer needed.

import tls from 'node:tls';

// Disable TLS renegotiation explicitly now
const server = tls.createServer({
  key,
  cert,
  allowRenegotiation: false,
});

// Use global Web APIs instead of util.TextEncoder/TextDecoder
const bytes = new TextEncoder().encode('hello, Node 27');
const text = new TextDecoder().decode(bytes);

If you set allowRenegotiation: false ahead of time and drop TextDecoder/TextEncoder imports from node:util, upgrading to the final Node.js 27 release will go smoothly without noisy warnings.

ChangeStatus in AlphaWhat to Do in Your Project
node:sqliteStability: 2 - StableTest replacing native addons
--process-timeoutGraduated from experimentalEnable in CI to catch hangs (124)
--process-timeout-worker-stacksStability: 1.1Add when debugging worker_threads
TLS renegotiationDocs-deprecatedSet allowRenegotiation: false
util.TextDecoder / TextEncoderDeprecatedSwitch to global Web APIs

You can already test the stable features in staging environments, and there is plenty of runway before Node.js 27 ships for the deprecations.

Under the Hood: Ada 4.1.1, Ring Buffer in Streams, and CLI Polish

Core engines also saw solid upgrades. The URL parser updated to Ada 4.1.1, a fast WHATWG-compliant C++ parser for URL and URLPattern. Version 4.1.0 sped up can_parse for canonical HTTP(S) URLs, switched percent_decode to batch copying, added SHRN optimizations for ARM NEON, and removed unnecessary rollback snapshots in setters. Patch 4.1.1 fixed a use-after-free memory bug in url_pattern and updated ada-idna to 0.8.0.

Streams in stream/iter got a rework too: operation queues, broadcast, and merge() now use RingBuffer, a circular buffer over a fixed array where pointers wrap around without shifting elements or extra allocations. This also removes unnecessary async generators and per-chunk promise creation.

For servers, HTTP/2 gained writeProcessing() in compat response, setHeaders, and callbacks for informational headers. CLI authors get os.guessFileDescriptorType (a cross-platform check for whether stdin is piped, without fs hacks) and TTY state restoration on exit only when the script actually changed it. Core dependencies also moved forward: V8 15.6.75.60, undici 8.13.1, npm 12.2.3, simdjson 5.2.0, and zstd 1.6.0.

Want a deep diveVotes help us choose what to break down in detail. This material has 0 votes.
Sources · 8