From a01ec41f68279596fa170f0cfbbd6aeaa86cdb7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=86=A1=EB=B3=91=EC=A4=80?= Date: Tue, 13 Jan 2026 09:42:10 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74285=20[node]?= =?UTF-8?q?=20Add=20missing=20hasRef,=20ref,=20unref=20to=20MessagePort=20?= =?UTF-8?q?by=20@potados99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/node/node-tests/worker_threads.ts | 8 ++++++++ types/node/worker_threads.d.ts | 3 +++ 2 files changed, 11 insertions(+) diff --git a/types/node/node-tests/worker_threads.ts b/types/node/node-tests/worker_threads.ts index 5891fddb9839ca..eb835cc7b1e854 100644 --- a/types/node/node-tests/worker_threads.ts +++ b/types/node/node-tests/worker_threads.ts @@ -178,6 +178,14 @@ import { createContext } from "node:vm"; const mp2 = new MessagePort(); } +{ + // Test hasRef, ref, unref + const mp1 = new workerThreads.MessagePort(); + mp1.hasRef(); + mp1.ref(); + mp1.unref(); +} + { // Test addEventListener, removeEventListener and dispatchEvent if (workerThreads.isMainThread) { diff --git a/types/node/worker_threads.d.ts b/types/node/worker_threads.d.ts index bd96f0681c9b92..1654e4a6b2f125 100644 --- a/types/node/worker_threads.d.ts +++ b/types/node/worker_threads.d.ts @@ -654,6 +654,9 @@ declare module "node:worker_threads" { postMessage(message: any, transfer: Transferable[]): void; postMessage(message: any, options?: StructuredSerializeOptions): void; start(): void; + hasRef(): boolean; + ref(): void; + unref(): void; addEventListener( type: K, listener: (ev: MessagePortEventMap[K]) => void, From fa21e36595d5486302a94352edc9dab498af8956 Mon Sep 17 00:00:00 2001 From: Trim21 Date: Tue, 13 Jan 2026 10:51:36 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#74264=20[creat?= =?UTF-8?q?e-torrent]:=20fix=20return=20type=20by=20@trim21?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/create-torrent/create-torrent-tests.ts | 6 +++--- types/create-torrent/index.d.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/types/create-torrent/create-torrent-tests.ts b/types/create-torrent/create-torrent-tests.ts index 004015b0090e67..d80ed65e21f8a6 100644 --- a/types/create-torrent/create-torrent-tests.ts +++ b/types/create-torrent/create-torrent-tests.ts @@ -1,11 +1,11 @@ /// import createTorrent, { announceList, isJunkPath } from "create-torrent"; -const cb = (err: Error | null, torrent?: Buffer) => {}; +const cb = (err: Error | null, torrent: Uint8Array) => {}; -createTorrent("test", (err: Error | null, torrent?: Buffer) => { +createTorrent("test", (err: Error | null, torrent: Uint8Array) => { if (err) return; - if (torrent) torrent.equals(Buffer.alloc(0)); + if (torrent) Buffer.from(torrent).equals(Buffer.alloc(0)); }); createTorrent(["a.txt", "b.txt"], cb); diff --git a/types/create-torrent/index.d.ts b/types/create-torrent/index.d.ts index 5813cec9121ffb..c59841dd0afec4 100644 --- a/types/create-torrent/index.d.ts +++ b/types/create-torrent/index.d.ts @@ -1,7 +1,7 @@ /// import type { Readable as ReadableStream } from "node:stream"; -export type CreateTorrentCallback = (err: Error | null, torrent?: Buffer) => void; +export type CreateTorrentCallback = (err: Error | null, torrent: Uint8Array) => void; export interface CreateTorrentOptions { // name of the torrent (default = basename of `path`, or 1st file's name) From 32d56f128672143e84222d4ef328f65076f89aea Mon Sep 17 00:00:00 2001 From: Niklas Wenzel Date: Tue, 13 Jan 2026 03:55:00 +0100 Subject: [PATCH 3/3] [nodegit] Remove @nikwen as an owner (#74291) --- types/nodegit/package.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/types/nodegit/package.json b/types/nodegit/package.json index 4de05b57314719..cba550be0f0705 100644 --- a/types/nodegit/package.json +++ b/types/nodegit/package.json @@ -40,10 +40,6 @@ { "name": "Jake Murzy", "githubUsername": "jmurzy" - }, - { - "name": "Niklas Wenzel", - "githubUsername": "nikwen" } ] }