Node.js 26.14.0 “Lithium” (LTS) was released on 30 November 2026, together with 24.23.0 “Krypton” (LTS). It’s a semver-minor update to the Node.js 26 LTS line, and it adds a small set of useful APIs: a safe temporary-file creator, a way to tell whether a child process was killed by its timeout, a CRC-32C checksum, and shorthand helpers for mocks in the built-in test runner.
This guide shows each one with working code. I ran every example on the official node-v26.14.0-linux-x64 build, and the outputs shown are real.
Upgrade
# nvm
nvm install 26.14.0
nvm use 26.14.0
# or fnm
fnm install 26.14.0 && fnm use 26.14.0
node -v # v26.14.0
For Docker, bump your base image to the 26.14.0 tag once it appears in your registry. Full notes are on the official release page.
1. fs.mkstemp(): create temp files safely
Building a temp path yourself with os.tmpdir() and a random string, then opening it, leaves a gap between choosing the name and creating the file. Another process can claim the name in between. The new API, marked Experimental in the docs, creates and opens the file in one operation. On POSIX systems the file is readable and writable only by its owner.
// tmpfile.mjs
import { mkstemp } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';
const { path, handle } = await mkstemp(join(tmpdir(), 'report-'));
try {
await handle.writeFile('id,total\n1,99\n');
console.log('wrote', path);
} finally {
await handle.close();
}
$ node tmpfile.mjs
wrote /tmp/report-hkUPGq
Node appends six random characters to the prefix. The promise version returns { path, handle }, where handle is a FileHandle. fs.mkstempSync() returns { path, fd }, and there’s a callback-style fs.mkstemp() too. The docs advise against trailing X characters in the prefix, because some platforms (notably the BSDs) treat them differently.
Note: mkstemp doesn’t delete the file for you. Remove it with fs.promises.rm(path) when you’re done, or keep temp files inside a directory you clean up.
2. subprocess.timedOut: know why a child died
spawn, exec, execFile and fork all accept a timeout option, but until now an exit event with SIGTERM looked the same whether your timeout fired or something else killed the process. The new subprocess.timedOut boolean tells them apart:
// timeout.mjs
import { spawn } from 'node:child_process';
const child = spawn('sleep', ['10'], { timeout: 500 });
child.on('exit', (code, signal) => {
if (child.timedOut) {
console.log(`killed after timeout (signal: ${signal})`);
} else {
console.log(`exited with code ${code}`);
}
});
$ node timeout.mjs
killed after timeout (signal: SIGTERM)
The docs point out that, like subprocess.killed, timedOut means the kill signal was sent. It doesn’t mean the process has exited yet. Read it in your exit or close handler. This is very handy for job runners and CI tools that want to report “timed out” instead of a vague failure.
3. zlib.crc32c(): the Castagnoli checksum
Node already had zlib.crc32(). 26.14 adds CRC-32C, the variant used by iSCSI, SCTP, ext4, Btrfs and the Snappy framing format. The docs say it has better error-detection properties than CRC-32. It’s not a cryptographic hash, so don’t use it for security.
// crc.mjs
import { crc32, crc32c } from 'node:zlib';
const data = 'hello world';
console.log('crc32 :', crc32(data).toString(16));
console.log('crc32c:', crc32c(data).toString(16));
// Streaming: pass the previous value to continue the checksum
let running = 0;
for (const part of ['hello ', 'world']) running = crc32c(part, running);
console.log('chunked crc32c matches:', running === crc32c(data));
$ node crc.mjs
crc32 : d4a1185
crc32c: c99465aa
chunked crc32c matches: true
The two algorithms give different results for the same input. Strings are encoded as UTF-8, and Buffer, TypedArray and DataView inputs are accepted too. If you’ve been pulling in a native CRC-32C package to verify object-storage uploads or Snappy frames, you may be able to drop it.
4. Test runner: mockReturnValue and promise helpers
Mocks in node:test used to need mockImplementation(() => value) for every simple stub. 26.14 adds shorthands on the mock context: mockReturnValue(), mockThrownValue(), mockResolvedValue() and a rejected-promise counterpart, mockRejectedValue().
// price.test.mjs
import { test } from 'node:test';
import assert from 'node:assert/strict';
async function priceWithTax(getRate, amount) {
const rate = await getRate();
return Math.round(amount * (1 + rate));
}
test('uses the resolved tax rate', async (t) => {
const getRate = t.mock.fn();
getRate.mock.mockResolvedValue(0.18);
assert.equal(await priceWithTax(getRate, 100), 118);
assert.equal(getRate.mock.callCount(), 1);
});
test('surfaces rate lookup failures', async (t) => {
const getRate = t.mock.fn();
getRate.mock.mockRejectedValue(new Error('rate service down'));
await assert.rejects(priceWithTax(getRate, 100), { message: 'rate service down' });
});
test('sync helpers', (t) => {
const flag = t.mock.fn();
flag.mock.mockReturnValue(true);
assert.equal(flag(), true);
flag.mock.mockThrownValue(new Error('boom'));
assert.throws(flag, { message: 'boom' });
});
$ node --test price.test.mjs
✔ uses the resolved tax rate (1.355905ms)
✔ surfaces rate lookup failures (0.81234ms)
✔ sync helpers (0.261976ms)
ℹ tests 3
ℹ pass 3
ℹ fail 0
If you moved off Jest but missed mockResolvedValue, it’s now built in. Keep in mind these helpers only exist on 26.14+. Libraries that also support older Node lines should stick with mockImplementation.
5. process.finalization.register() returns an unregister function
process.finalization (a release candidate API) runs a cleanup callback at process exit for objects that haven’t been garbage-collected. From 26.14, register() returns a function that removes the registration:
const pool = { name: 'db' };
const unregister = process.finalization.register(pool, (ref, event) => {
console.log('cleanup', ref.name, event);
});
// Later, after you've closed the pool yourself:
unregister();
That’s cleaner than keeping the original object around just to call unregister(ref).
Other notable changes
From the release notes’ “Notable Changes” list:
--experimental-strip-private-modules, a new experimental module flag.- Faster
AbortSignal, and HTTP body spans batched per parser execute. - Worker startup: streams are preloaded into the startup snapshot.
- Test runner now uses
AsyncLocalStorageinstead ofasync_hooksinternally. - Many crypto fixes and speed-ups, such as reusing HMAC contexts in
createHmac()and caching digests for synchronous operations.
Should you upgrade?
Yes, if you’re on 26.x. It’s a routine LTS minor release with new, opt-in APIs. Two cautions:
fs.mkstemp()is marked Experimental, so its shape could still change. Wrap it in a small helper so a future change only touches one file.- If you publish packages, don’t use these APIs unconditionally unless your
enginesfield requires>=26.14.
Takeaways
- Node.js 26.14.0 LTS adds
fs.mkstemp(),subprocess.timedOut,zlib.crc32c()and test-runner mock shorthands. - Each removes a small but common workaround: race-prone temp files, guessing why a child process died, extra checksum packages, and verbose mocks.
- Upgrade with nvm or fnm, run your tests, and adopt the APIs where they simplify code.
Sources: Node.js v26.14.0 release notes, fs docs, child_process docs, zlib docs, test runner docs.
