Changelog

nodejs/node · · 22 commits

Crypto refactor lands, perf fixes follow

Major crypto provider plumbing changes, plus fixes for HTTPS proxy errors, performance hooks, streams, and cleanup hooks.

Crypto provider plumbing refactor broadens key handling (panva28a1343, panva59b5ac8, panva6adf7c1, panvad20c978, panva36e326b, panva2b68fcd)

Node’s crypto internals were reworked to lean more heavily on provider-backed APIs for KDFs, RSA key details, PKCS#1 public-key import, EC group naming, and private-key encoding. This reduces legacy OpenSSL-specific parsing paths and makes key metadata and generation behavior more consistent under provider and FIPS modes.

structuredClone gets a primitive fast path (araujoguibfb84d3)

structuredClone() now returns primitive values directly when called without options, skipping the serialize/deserialize round-trip. That trims overhead for the common case and adds coverage for primitives, -0, and symbol rejection.

HTTPS proxy requests now surface invalid TLS option errors (christianaurichzmada8c5c)

Proxied HTTPS requests now catch synchronous tls.connect() validation failures after the CONNECT tunnel is established, close the tunnel socket, and route the error back to the request instead of crashing the process. This fixes an uncaught-exception path for bad TLS options.

perf_hooks fixes GC observer tracking across snapshots and disconnects (jasnell1055987, jasnella293ec7, jasnell4290a2d)

GC observer bookkeeping now lives in native state, can be reconciled safely, and is restored after snapshot deserialization when 'gc' observers are active. The observer count logic also avoids double-counting duplicate entry types, preventing GC tracking leaks and stale performance entry generation.

Web streams remove per-instance setup overhead (mcollinaf466c0c)

Internal ReadableStream/WritableStream construction paths were simplified to avoid per-instance prototype swapping and extra wrapper objects. The pipe finalization path also drops unused promise records earlier, cutting fixed costs for short-lived streams.

Cleanup hooks can be shared across Environments on one isolate (codebytere8929166)

Environment cleanup hooks are now keyed to allow the same hook to be registered in multiple Environments that share an isolate, matching Node-API expectations. The removal logic now prefers the current Environment when possible and tolerates running hooks removing themselves.

Linked bindings can be exempted from addon permission checks (codebytere25e6c15)

Embedders can now opt out of the addon permission gate for process._linkedBinding() via a new environment flag. Worker threads inherit the setting, and tests cover both denied and allowed behavior.

Task queue draining no longer deadlocks under C++23 (codebytere32d23ec)

The platform task drain loops were adjusted so C++23’s longer temporary lifetime in range-for initializers no longer keeps the queue mutex held while executing tasks. This fixes a deadlock path when tasks post back onto the same queue.

Other misc changes

  • Python 3.13 compatibility updates for tools/v8.
  • Revert of the depot_tools version override.
  • ESLint plugin and codecov action dependency bumps.
  • Minor crypto test consolidation and a small fs test tweak.