Node.js v27.0.0-alpha 弃用 domain,移除 FIPS 并升级 OpenSSL
2026-10-29, Version 27.0.0-alpha.0.0.0 (Alpha), @RafaelGSS
推荐理由
v27 是重大破坏性版本,OpenSSL 升级、domain 弃用及 http/dns 行为变更将直接打断现有用法。请重点检查加密逻辑与 HTTP 处理代码,尽早适配。
Notable Changes
重要变更
V8 15.6
The V8 engine is updated to version 15.6.75.13, up from 14.6 in Node.js 26. Highlights:
V8 引擎已更新至版本 15.6.75.13,此前在 Node.js 26 中为 14.6。亮点:
- New language features enabled by default: Math.sumPrecise(), Intl.Locale.prototype.variants, Iterator.prototype.join(), Iterator.prototype.includes(), Iterator.zip() and Iterator.zipKeyed().
- Experimental features behind flags: import defer (--js-defer-import-eval), Immutable ArrayBuffer (--js-immutable-arraybuffer) and RegExp buffer boundaries (--js-regexp-buffer-boundaries).
- Memory: when --max-old-space-size is not set, the default heap size limit is now half of the physical memory clamped between 256 MB and 4 GB, and memory held by Buffer and ArrayBuffer instances now counts toward the heap limit. Applications that relied on the previous defaults should set --max-old-space-size explicitly.
- Serialization: v8.serialize(), structuredClone() and postMessage() use a new format that older Node.js releases cannot read. v8.cachedDataVersionTag() and the compile cache also change on every Node.js patch of V8, not only on V8 version changes.
- Observable behavior changes: Math methods now use LLVM's libm and may differ in the last bit; Math.random() sequences change for a given --random-seed; error.stack is no longer looked up through the prototype chain; await incurs fewer microtasks; Array.prototype.sort() uses PowerSort for large arrays and remains stable.
- Heap snapshots include internal objects, numeric values and full script sources. Taking one takes about twice as long and the file is about twice as large.
- WebAssembly: asm.js is no longer compiled to WebAssembly, and the --experimental-wasm-<name> flags are renamed --wasm-<name>.
- 默认启用的新语言特性:Math.sumPrecise()、Intl.Locale.prototype.variants、Iterator.prototype.join()、Iterator.prototype.includes()、Iterator.zip() 和 Iterator.zipKeyed()。
- 通过标志位控制的实验性功能:import defer(--js-defer-import-eval)、Immutable ArrayBuffer(--js-immutable-arraybuffer)和 RegExp buffer boundaries(--js-regexp-buffer-boundaries)。
- 内存:当未设置 --max-old-space-size 时,默认的堆大小限制现在为物理内存的一半,并在 256 MB 到 4 GB 之间进行限制,Buffer 和 ArrayBuffer 实例所占用的内存现在计入堆限制。依赖之前默认值的用户应显式设置 --max-old-space-size。
- 序列化:v8.serialize()、structuredClone() 和 postMessage() 使用较旧的 Node.js 版本无法读取的新格式。v8.cachedDataVersionTag() 和编译缓存也会在每次 V8 的 Node.js 补丁更新时发生变化,而不仅仅是在 V8 版本变更时。
- 可观测行为变更:Math 方法现在使用 LLVM 的 libm,最后一位可能有所不同;给定 --random-seed 时 Math.random() 序列会发生变化;error.stack 不再通过原型链查找;await 产生的微任务减少;Array.prototype.sort() 对大型数组使用 PowerSort 并保持稳定排序。
- 堆快照包含内部对象、数值和完整的脚本源代码。生成一次堆快照所需时间约为之前的两倍,文件大小也约为之前的两倍。
- WebAssembly:asm.js 不再编译为 WebAssembly,且 --experimental-wasm-<name> 标志已重命名为 --wasm-<name>。
A full changelog of the V8 changes between 14.6 and 15.6 will be shared soon.
关于 V8 从 14.6 到 15.6 之间的完整变更日志将很快发布。
Contributed by Joyee Cheung in #65161, #66537 and #66601.
由 Joyee Cheung 在 #65161、#66537 和 #66601 中贡献。
Other notable changes
其他重要变更
- [21cfb2a4ad] - (SEMVER-MAJOR) build: remove the bundled FIPS provider build (Filip Skokan) #64777
- [34e3b90621] - (SEMVER-MAJOR) build: require OpenSSL 3 or later (Filip Skokan) #64777
- [c362db6e24] - (SEMVER-MAJOR) build: downgrade Intel macOS support to experimental (Antoine du Hamel) #65427
- [fb8d52d75a] - (SEMVER-MAJOR) crypto: move DEP0093 to End-of-Life (Filip Skokan) #64777
- [8be36fb494] - (SEMVER-MAJOR) crypto: remove legacy OpenSSL code paths (Filip Skokan) #64777
- [718f044f07] - (SEMVER-MAJOR) crypto: validate digest output encodings (Filip Skokan) #66247
- [6b8001d219] - (SEMVER-MAJOR) crypto: validate update input encodings (Filip Skokan) #66247
- [127f79a911] - (SEMVER-MAJOR) crypto: validate inputEncoding in Cipher/Decipher update (Maruthan G) #66247
- [b116861e88] - (SEMVER-MAJOR) crypto: move DEP0198 to End-of-Life (Filip Skokan) #64000
- [4d09c04253] - (SEMVER-MAJOR) crypto: move DEP0203 and DEP0204 to End-of-Life (Filip Skokan) #63188
- [9d50432837] - (SEMVER-MAJOR) crypto: reject resizable backing stores in Web Crypto buffer parameters (Filip Skokan) #63925
- [63907e1018] - (SEMVER-MAJOR) crypto: throw on uninitialized DH computeSecret (Filip Skokan) #63922
- [463e56fb00] - (SEMVER-MAJOR) crypto: runtime-deprecate calling Hmac.digest() more than once (Madelyn) #63624
- [a2cd8aa883] - (SEMVER-MAJOR) crypto,https,tls: end OpenSSL engine support (Filip Skokan) #64777
- [3983092f63] - (SEMVER-MAJOR) deps: update archs files for openssl-4.1.0 (Node.js GitHub Bot) #66971
- [79239a48f1] - (SEMVER-MAJOR) deps: upgrade openssl sources to openssl-4.1.0 (Node.js GitHub Bot) #66971
- [85bfe9a938] - (SEMVER-MAJOR) deps: remove ncrypto legacy OpenSSL backend (Filip Skokan) #64777
- [826df076a3] - (SEMVER-MAJOR) deps: update V8 to 15.6.75.13 (Joyee Cheung) #66601
- [4eb3908d1f] - (SEMVER-MAJOR) deps: upgrade npm to 12.1.0 (npm team) #66212
- [cba0833111] - (SEMVER-MAJOR) dgram: skip the custom lookup for literal IP addresses (Ruben Bridgewater) #64131
- [54a5095764] - (SEMVER-MAJOR) dns: do not consult hosts file in reverse lookups (Archkon) #64268
- [efc0a14461] - (SEMVER-MAJOR) dns: stop using deprecated functions in SetServers (Antoine du Hamel) #64356
- [7f16850ef6] - (SEMVER-MAJOR) doc: remove OpenSSL 1.x references (Filip Skokan) #64777
- [9c67491706] - (SEMVER-MAJOR) doc: update Node.js 27 official binary toolchains (Richard Lau) #66377
- [6071f8bc32] - (SEMVER-MAJOR) domain: runtime-deprecate the module (Matteo Collina) #65074
- [2c4356cedf] - (SEMVER-MAJOR) domain: port to AsyncLocalStorage (Matteo Collina) #61095
- [a8f2bf007e] - (SEMVER-MAJOR) fs: implement glob natively (Aviv Keller) #65392
- [1f53d7ee3f] - (SEMVER-MAJOR) fs: return Buffer from mkdtemp when prefix is a Buffer (Hamid Reza Ghavami) #64397
- [e5778f78c5] - (SEMVER-MAJOR) http: reject responses exceeding header limit (Matteo Collina) #65010
- [25c0c8e18a] - (SEMVER-MAJOR) http: runtime deprecate instantiating without new (Yagiz Nizipli) #64853
- [9f75269840] - (SEMVER-MAJOR) http: increase keepAliveTimeout default to 65 seconds (Tim Perry) #62782
- [21436f0405] - (SEMVER-MAJOR) http: make req.headers have a null prototype (Matteo Collina) #62900
- [b2248fd370] - (SEMVER-MAJOR) http: reject addTrailers after finish (Ryuhei Shima) #62832
- [1576cb83b4] - (SEMVER-MAJOR) http2: increase default window sizes (Matteo Collina) #64623
- [12ce81920a] - (SEMVER-MAJOR) lib: deprecate _http_* (Sebastian Beltran) #58535
- [19c46abbef] - (SEMVER-MAJOR) lib: insert argv[0] at argv[1] in setDeserializeMainFunction (Daijiro Wachi) #62928
- [b1387e6aed] - (SEMVER-MAJOR) lib: use Object.freeze to avoid defensive cloning in SourceMap (Daijiro Wachi) #62830
- [9390c810d1] - (SEMVER-MAJOR) lib: reject SharedArrayBuffer in Blob constructor per spec (Ali Hassan) #63046
- [057e591f7c] - (SEMVER-MAJOR) lib,src: remove --no-experimental-websocket CLI flag (Antoine du Hamel) #65284
- [9746ebce07] - (SEMVER-MAJOR) net: race family autoselection attempts (Matteo Collina) #66229
- [e03e2f6486] - (SEMVER-MAJOR) net: throw on multiple listen calls (Matteo Collina) #64871
- [a6e7e6a95e] - (SEMVER-MAJOR) net: runtime-deprecate Server.prototype._listen2 (Guilherme Araújo) #64794
- [6d8baeabb0] - (SEMVER-MAJOR) net: add experimental net/promises API (Ethan Arrowood) #63965
- [4f844f4380] - (SEMVER-MAJOR) repl: use inspector over vm (Aviv Keller) #64034
- [fc28d9402f] - (SEMVER-MAJOR) src: officially deprecate node::ObjectWrap (Anna Henningsen) #63756
- [2d0c926907] - (SEMVER-MAJOR) src: merge CreateEnvironment() overloads (Anna Henningsen) #63596
- [f378cfcfbf] - (SEMVER-MAJOR) src,lib: add --allow-env permission (James M Snell) #66132
- [9f7ae86d8b] - (SEMVER-MAJOR) stream: destroy source when map iterator closes early (Y1D7NG) #64264
- [6698675526] - test_runner: use AsyncLocalStorage instead of async_hooks (Matteo Collina) #66795
- [7a11a9b2db] - (SEMVER-MAJOR) tls: move _tls_* to end-of-life (Sebastian Beltran) #60658
- [967d4af565] - (SEMVER-MAJOR) zlib: convert classes to modern syntax and eol DEP0184 (Yagiz Nizipli) #64849
- [21cfb2a4ad] - (SEMVER-MAJOR) build: 移除捆绑的 FIPS provider 构建 (Filip Skokan) #64777
- [34e3b90621] - (SEMVER-MAJOR) build: 要求 OpenSSL 3 或更高版本 (Filip Skokan) #64777
- [c362db6e24] - (SEMVER-MAJOR) build: 将 Intel macOS 支持降级为实验性 (Antoine du Hamel) #65427
- [fb8d52d75a] - (SEMVER-MAJOR) crypto: 将 DEP0093 移至生命周期结束 (Filip Skokan) #64777
- [8be36fb494] - (SEMVER-MAJOR) crypto: 移除遗留的 OpenSSL 代码路径 (Filip Skokan) #64777
- [718f044f07] - (SEMVER-MAJOR) crypto: 验证摘要输出编码 (Filip Skokan) #66247
- [6b8001d219] - (SEMVER-MAJOR) crypto: 验证更新输入编码 (Filip Skokan) #66247
- [127f79a911] - (SEMVER-MAJOR) crypto: 验证 Cipher/Decipher update 中的 inputEncoding (Maruthan G) #66247
- [b116861e88] - (SEMVER-MAJOR) crypto: 将 DEP0198 移至 End-of-Life (Filip Skokan) #64000
- [4d09c04253] - (SEMVER-MAJOR) crypto: 将 DEP0203 和 DEP0204 移至 End-of-Life (Filip Skokan) #63188
- [9d50432837] - (SEMVER-MAJOR) crypto: 在 Web Crypto buffer 参数中拒绝可调整大小的 backing stores (Filip Skokan) #63925
- [63907e1018] - (SEMVER-MAJOR) crypto: 在未初始化的 DH computeSecret 上抛出异常 (Filip Skokan) #63922
- [463e56fb00] - (SEMVER-MAJOR) crypto: 运行时弃用多次调用 Hmac.digest() (Madelyn) #63624
- [a2cd8aa883] - (SEMVER-MAJOR) crypto,https,tls: 终止 OpenSSL engine 支持 (Filip Skokan) #64777
- [3983092f63] - (SEMVER-MAJOR) deps: 为 openssl-4.1.0 更新 archs 文件 (Node.js GitHub Bot) #66971
- [79239a48f1] - (SEMVER-MAJOR) deps: 将 openssl 源码升级至 openssl-4.1.0 (Node.js GitHub Bot) #66971
- [85bfe9a938] - (SEMVER-MAJOR) deps: 移除 ncrypto 遗留的 OpenSSL 后端 (Filip Skokan) #64777
- [826df076a3] - (SEMVER-MAJOR) deps: 将 V8 更新至 15.6.75.13 (Joyee Cheung) #66601
- [4eb3908d1f] - (SEMVER-MAJOR) deps: 将 npm 升级至 12.1.0 (npm team) #66212
- [cba0833111] - (SEMVER-MAJOR) dgram: 跳过对字面量 IP 地址的自定义查找 (Ruben Bridgewater) #64131
- [54a5095764] - (SEMVER-MAJOR) dns: 在反向查找中不查阅 hosts 文件 (Archkon) #64268
- [efc0a14461] - (SEMVER-MAJOR) dns: 停止在 SetServers 中使用已弃用的函数 (Antoine du Hamel) #64356
- [7f16850ef6] - (SEMVER-MAJOR) doc: 移除 OpenSSL 1.x 引用 (Filip Skokan) #64777
- [9c67491706] - (SEMVER-MAJOR) doc: 更新 Node.js 27 官方二进制工具链 (Richard Lau) #66377
- [6071f8bc32] - (SEMVER-MAJOR) domain: 运行时弃用该模块 (Matteo Collina) #65074
- [2c4356cedf] - (SEMVER-MAJOR) domain: 移植到 AsyncLocalStorage (Matteo Collina) #61095
- [a8f2bf007e] - (SEMVER-MAJOR) fs: 原生实现 glob (Aviv Keller) #65392
- [1f53d7ee3f] - (SEMVER-MAJOR) fs: 当 prefix 为 Buffer 时,mkdtemp 返回 Buffer (Hamid Reza Ghavami) #64397
- [e5778f78c5] - (SEMVER-MAJOR) http: 拒绝超出 header 限制响应 (Matteo Collina) #65010
- [25c0c8e18a] - (SEMVER-MAJOR) http: 运行时弃用不使用 new 实例化 (Yagiz Nizipli) #64853
- [9f75269840] - (SEMVER-MAJOR) http: 将 keepAliveTimeout 默认值增加至 65 秒 (Tim Perry) #62782
- [21436f0405] - (SEMVER-MAJOR) http: 使 req.headers 具有 null 原型 (Matteo Collina) #62900
- [b2248fd370] - (SEMVER-MAJOR) http: 在 finish 后拒绝 addTrailers (Ryuhei Shima) #62832
- [1576cb83b4] - (SEMVER-MAJOR) http2: 增加默认窗口大小 (Matteo Collina) #64623
- [12ce81920a] - (SEMVER-MAJOR) lib: 弃用 _http_* (Sebastian Beltran) #58535
- [19c46abbef] - (SEMVER-MAJOR) lib: 在 setDeserializeMainFunction 中将 argv[0] 插入到 argv[1] (Daijiro Wachi) #62928
- [b1387e6aed] - (SEMVER-MAJOR) lib: 使用 Object.freeze 避免 SourceMap 中的防御性克隆 (Daijiro Wachi) #62830
- [9390c810d1] - (SEMVER-MAJOR) lib: 根据规范在 Blob 构造函数中拒绝 SharedArrayBuffer (Ali Hassan) #63046
- [057e591f7c] - (SEMVER-MAJOR) lib,src: 移除 --no-experimental-websocket CLI 标志 (Antoine du Hamel) #65284
- [9746ebce07] - (SEMVER-MAJOR) net: 竞态条件处理 family 自动选择尝试 (Matteo Collina) #66229
- [e03e2f6486] - (SEMVER-MAJOR) net: 多次调用 listen 时抛出异常 (Matteo Collina) #64871
- [a6e7e6a95e] - (SEMVER-MAJOR) net: 运行时弃用 Server.prototype._listen2 (Guilherme Araújo) #64794
- [6d8baeabb0] - (SEMVER-MAJOR) net: 添加实验性 net/promises API (Ethan Arrowood) #63965
- [4f844f4380] - (SEMVER-MAJOR) repl: 使用 inspector 而非 vm (Aviv Keller) #64034
- [fc28d9402f] - (SEMVER-MAJOR) src: 正式弃用 node::ObjectWrap (Anna Henningsen) #63756
- [2d0c926907] - (SEMVER-MAJOR) src: 合并 CreateEnvironment() 重载 (Anna Henningsen) #63596
- [f378cfcfbf] - (SEMVER-MAJOR) src,lib: 添加 --allow-env 权限 (James M Snell) #66132
- [9f7ae86d8b] - (SEMVER-MAJOR) stream: 当 map 迭代器提前关闭时销毁源 (Y1D7NG) #64264
- [6698675526] - test_runner: 使用 AsyncLocalStorage 替代 async_hooks (Matteo Collina) #66795
- [7a11a9b2db] - (SEMVER-MAJOR) tls: 将 _tls_* 移至生命周期结束 (Sebastian Beltran) #60658
- [967d4af565] - (SEMVER-MAJOR) zlib: 将类转换为现代语法并标记 DEP0184 为生命周期结束 (Yagiz Nizipli) #64849
Semver-Major Commits
Semver-Major 提交
- [984aa0c25e] - (SEMVER-MAJOR) async_hooks: remove legacy AsyncLocalStorage implementation (Matteo Collina) #63641
- [d1960949bb] - (SEMVER-MAJOR) benchmark: protect against accidental fork bomb (James M Snell) #66132
- [21cfb2a4ad] - (SEMVER-MAJOR) build: remove the bundled FIPS provider build (Filip Skokan) #64777
- [34e3b90621] - (SEMVER-MAJOR) build: require OpenSSL 3 or later (Filip Skokan) #64777
- [6f178cd39f] - (SEMVER-MAJOR) build: reset embedder string to "-node.0" (Joyee Cheung) #66601
- [60c7958b8e] - (SEMVER-MAJOR) build: update flags for V8 CI (Richard Lau) #66537
- [05c9b89d42] - (SEMVER-MAJOR) build: disable V8_USE_METAGEN_INSTANCE_TYPES (Joyee Cheung) #66537
- [18077b5d3a] - (SEMVER-MAJOR) build: do not match v8_libplatform_headers when scraping sources (Joyee Cheung) #66537
- [520388f362] - (SEMVER-MAJOR) build: reset embedder string to "-node.0" (Joyee Cheung) #66537
- [984aa0c25e] - (SEMVER-MAJOR) async_hooks: 移除遗留的 AsyncLocalStorage 实现 (Matteo Collina) #63641
- [d1960949bb] - (SEMVER-MAJOR) benchmark: 防止意外触发 fork bomb (James M Snell) #66132
- [21cfb2a4ad] - (SEMVER-MAJOR) build: 移除捆绑的 FIPS provider 构建 (Filip Skokan) #64777
- [34e3b90621] - (SEMVER-MAJOR) build: 要求 OpenSSL 3 或更高版本 (Filip Skokan) #64777
- [6f178cd39f] - (SEMVER-MAJOR) build: 将嵌入者字符串重置为 "-node.0" (Joyee Cheung) #66601
- [60c7958b8e] - (SEMVER-MAJOR) build: 更新 V8 CI 的标志 (Richard Lau) #66537
- [05c9b89d42] - (SEMVER-MAJOR) build: 禁用 V8_USE_METAGEN_INSTANCE_TYPES (Joyee Cheung) #66537
- [18077b5d3a] - (SEMVER-MAJOR) build: 在抓取源代码时不匹配 v8_libplatform_headers (Joyee Cheung) #66537
- [520388f362] - (SEMVER-MAJOR) build: 将嵌入者字符串重置为 "-node.0" (Joyee Cheung) #66537
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力