From 16aeddb8f4487daf2c2eed87270bff1e88ce9ab0 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 17 Aug 2020 16:15:31 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#46244=20[node]=20U?= =?UTF-8?q?pdate=20with=20changes=20from=20v14.6.0=20by=20@addaleax?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/nodejs/node/pull/34371 --- types/node/index.d.ts | 2 +- types/node/test/vm.ts | 8 ++++++++ types/node/test/worker_threads.ts | 4 ++++ types/node/tls.d.ts | 9 +++++++++ types/node/vm.d.ts | 4 ++++ types/node/worker_threads.d.ts | 1 + 6 files changed, 27 insertions(+), 1 deletion(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index dc98dcb05e3a59a..e917b54655493bd 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for non-npm package Node.js 14.0 +// Type definitions for non-npm package Node.js 14.6 // Project: http://nodejs.org/ // Definitions by: Microsoft TypeScript // DefinitelyTyped diff --git a/types/node/test/vm.ts b/types/node/test/vm.ts index cf2c12e60388d4e..3a4a0e94256cd1a 100644 --- a/types/node/test/vm.ts +++ b/types/node/test/vm.ts @@ -67,3 +67,11 @@ import { inspect } from 'util'; context: createContext(), }).then((data: MemoryMeasurement) => { }); } + +{ + runInNewContext( + 'blah', + { }, + { timeout: 5, microtaskMode: 'afterEvaluate' } + ); +} diff --git a/types/node/test/worker_threads.ts b/types/node/test/worker_threads.ts index cd97b4a00fea779..66cf68b887b389b 100644 --- a/types/node/test/worker_threads.ts +++ b/types/node/test/worker_threads.ts @@ -76,4 +76,8 @@ import { Readable } from "stream"; const wwww = new workerThreads.Worker(__filename, { env: { doot: 'woot' } }); + + const wwwww = new workerThreads.Worker(__filename, { + trackUnmanagedFds: true + }); } diff --git a/types/node/tls.d.ts b/types/node/tls.d.ts index df21ea226d5592b..6d28a37f00262df 100644 --- a/types/node/tls.d.ts +++ b/types/node/tls.d.ts @@ -706,6 +706,15 @@ declare module "tls" { * shared between applications. Unused by clients. */ sessionIdContext?: string; + /** + * 48 bytes of cryptographically strong pseudo-random data. + */ + ticketKeys?: Buffer; + /** + * The number of seconds after which a TLS session created by the server + * will no longer be resumable. + */ + sessionTimeout?: number; } interface SecureContext { diff --git a/types/node/vm.d.ts b/types/node/vm.d.ts index 822bd151db04ae1..bfa81d9702407c9 100644 --- a/types/node/vm.d.ts +++ b/types/node/vm.d.ts @@ -41,6 +41,10 @@ declare module "vm" { * Default: `false`. */ breakOnSigint?: boolean; + /** + * If set to `afterEvaluate`, microtasks will be run immediately after the script has run. + */ + microtaskMode?: 'afterEvaluate'; } interface CompileFunctionOptions extends BaseOptions { /** diff --git a/types/node/worker_threads.d.ts b/types/node/worker_threads.d.ts index 7eb4c241662ce01..1aea5d48fd43590 100644 --- a/types/node/worker_threads.d.ts +++ b/types/node/worker_threads.d.ts @@ -75,6 +75,7 @@ declare module "worker_threads" { * Additional data to send in the first worker message. */ transferList?: Array; + trackUnmanagedFds?: boolean; } interface ResourceLimits {