Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion types/node/assert.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* The `node:assert` module provides a set of assertion functions for verifying
* invariants.
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/assert.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/assert.js)
*/
declare module "assert" {
/**
Expand Down
2 changes: 1 addition & 1 deletion types/node/async_hooks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* import async_hooks from 'node:async_hooks';
* ```
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/async_hooks.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/async_hooks.js)
*/
declare module "async_hooks" {
/**
Expand Down
2 changes: 1 addition & 1 deletion types/node/buffer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* // Creates a Buffer containing the Latin-1 bytes [0x74, 0xe9, 0x73, 0x74].
* const buf7 = Buffer.from('tést', 'latin1');
* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/buffer.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/buffer.js)
*/
declare module "buffer" {
import { BinaryLike } from "node:crypto";
Expand Down
60 changes: 31 additions & 29 deletions types/node/child_process.d.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion types/node/cluster.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* ```
*
* On Windows, it is not yet possible to set up a named pipe server in a worker.
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/cluster.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/cluster.js)
*/
declare module "cluster" {
import * as child from "node:child_process";
Expand Down
2 changes: 1 addition & 1 deletion types/node/console.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* myConsole.warn(`Danger ${name}! Danger!`);
* // Prints: Danger Will Robinson! Danger!, to err
* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/console.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/console.js)
*/
declare module "console" {
import console = require("node:console");
Expand Down
3 changes: 2 additions & 1 deletion types/node/crypto.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* // Prints:
* // c0fa1bc00531bd78ef38c628449c5102aeabd49b5dc3a2a516ea6ea959d6658e
* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/crypto.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/crypto.js)
*/
declare module "crypto" {
import * as stream from "node:stream";
Expand Down Expand Up @@ -470,6 +470,7 @@ declare module "crypto" {
* // 7fd04df92f636fd450bc841c9418e5825c17f33ad9c87c518115a45971f7f77e
* ```
* @since v0.1.94
* @deprecated Since v20.13.0 Calling `Hmac` class directly with `Hmac()` or `new Hmac()` is deprecated due to being internals, not intended for public use. Please use the {@link createHmac} method to create Hmac instances.
*/
class Hmac extends stream.Transform {
private constructor();
Expand Down
2 changes: 1 addition & 1 deletion types/node/dgram.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* server.bind(41234);
* // Prints: server listening 0.0.0.0:41234
* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/dgram.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/dgram.js)
*/
declare module "dgram" {
import { AddressInfo } from "node:net";
Expand Down
11 changes: 10 additions & 1 deletion types/node/diagnostics_channel.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* should generally include the module name to avoid collisions with data from
* other modules.
* @since v15.1.0, v14.17.0
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/diagnostics_channel.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/diagnostics_channel.js)
*/
declare module "diagnostics_channel" {
import { AsyncLocalStorage } from "node:async_hooks";
Expand Down Expand Up @@ -419,6 +419,9 @@ declare module "diagnostics_channel" {
* This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all
* events should have any bound stores set to match this trace context.
*
* To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
* which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
*
Expand Down Expand Up @@ -451,6 +454,9 @@ declare module "diagnostics_channel" {
* returned promise rejects. This will run the given function using `channel.runStores(context, ...)` on the `start` channel which ensures all
* events should have any bound stores set to match this trace context.
*
* To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
* which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
*
Expand Down Expand Up @@ -502,6 +508,9 @@ declare module "diagnostics_channel" {
* The callback will also be run with `channel.runStores(context, ...)` which
* enables context loss recovery in some cases.
*
* To ensure only correct trace graphs are formed, events will only be published if subscribers are present prior to starting the trace. Subscriptions
* which are added after the trace begins will not receive future events from that trace, only future traces will be seen.
*
* ```js
* import diagnostics_channel from 'node:diagnostics_channel';
* import { AsyncLocalStorage } from 'node:async_hooks';
Expand Down
35 changes: 23 additions & 12 deletions types/node/dns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* ```
*
* See the [Implementation considerations section](https://nodejs.org/docs/latest-v20.x/api/dns.html#implementation-considerations) for more information.
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/dns.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/dns.js)
*/
declare module "dns" {
import * as dnsPromises from "node:dns/promises";
Expand All @@ -64,7 +64,7 @@ declare module "dns" {
export const ALL: number;
export interface LookupOptions {
/**
* The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons,`'IPv4'` and `'IPv6'` are interpreted
* The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons, `'IPv4'` and `'IPv6'` are interpreted
* as `4` and `6` respectively. The value 0 indicates that either an IPv4 or IPv6 address is returned. If the value `0` is used
* with `{ all: true } (see below)`, both IPv4 and IPv6 addresses are returned.
* @default 0
Expand All @@ -80,9 +80,18 @@ declare module "dns" {
* @default false
*/
all?: boolean | undefined;
/**
* When `verbatim`, the resolved addresses are return unsorted. When `ipv4first`, the resolved addresses are sorted
* by placing IPv4 addresses before IPv6 addresses. When `ipv6first`, the resolved addresses are sorted by placing IPv6
* addresses before IPv4 addresses. Default value is configurable using
* {@link setDefaultResultOrder} or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
* @default `verbatim` (addresses are not reordered)
*/
order?: "ipv4first" | "ipv6first" | "verbatim" | undefined;
/**
* When `true`, the callback receives IPv4 and IPv6 addresses in the order the DNS resolver returned them. When `false`, IPv4
* addresses are placed before IPv6 addresses. Default value is configurable using {@link setDefaultResultOrder()}
* addresses are placed before IPv6 addresses. This option will be deprecated in favor of `order`. When both are specified,
* `order` has higher precedence. New code should only use `order`. Default value is configurable using {@link setDefaultResultOrder}
* or [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
* @default true (addresses are not reordered)
*/
Expand Down Expand Up @@ -663,14 +672,15 @@ declare module "dns" {
callback: (err: NodeJS.ErrnoException | null, hostnames: string[]) => void,
): void;
/**
* Get the default value for `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
* Get the default value for `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
* The value could be:
*
* * `ipv4first`: for `verbatim` defaulting to `false`.
* * `verbatim`: for `verbatim` defaulting to `true`.
* * `ipv4first`: for `order` defaulting to `ipv4first`.
* * `ipv6first`: for `order` defaulting to `ipv6first`.
* * `verbatim`: for `order` defaulting to `verbatim`.
* @since v18.17.0
*/
export function getDefaultResultOrder(): "ipv4first" | "verbatim";
export function getDefaultResultOrder(): "ipv4first" | "ipv6first" | "verbatim";
/**
* Sets the IP address and port of servers to be used when performing DNS
* resolution. The `servers` argument is an array of [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6) formatted
Expand Down Expand Up @@ -717,20 +727,21 @@ declare module "dns" {
*/
export function getServers(): string[];
/**
* Set the default value of `verbatim` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
* Set the default value of `order` in {@link lookup} and [`dnsPromises.lookup()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromiseslookuphostname-options).
* The value could be:
*
* * `ipv4first`: sets default `verbatim` `false`.
* * `verbatim`: sets default `verbatim` `true`.
* * `ipv4first`: sets default `order` to `ipv4first`.
* * `ipv6first`: sets default `order` to `ipv6first`.
* * `verbatim`: sets default `order` to `verbatim`.
*
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
* priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder). When using
* [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), {@link setDefaultResultOrder} from the main
* thread won't affect the default dns orders in workers.
* @since v16.4.0, v14.18.0
* @param order must be `'ipv4first'` or `'verbatim'`.
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
*/
export function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
export function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
// Error codes
export const NODATA: "NODATA";
export const FORMERR: "FORMERR";
Expand Down
13 changes: 7 additions & 6 deletions types/node/dns/promises.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,27 +338,28 @@ declare module "dns/promises" {
* progress.
*
* This method works much like [resolve.conf](https://man7.org/linux/man-pages/man5/resolv.conf.5.html).
* That is, if attempting to resolve with the first server provided results in a`NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
* That is, if attempting to resolve with the first server provided results in a `NOTFOUND` error, the `resolve()` method will _not_ attempt to resolve with
* subsequent servers provided. Fallback DNS servers will only be used if the
* earlier ones time out or result in some other error.
* @since v10.6.0
* @param servers array of `RFC 5952` formatted addresses
*/
function setServers(servers: readonly string[]): void;
/**
* Set the default value of `verbatim` in `dns.lookup()` and `dnsPromises.lookup()`. The value could be:
* Set the default value of `order` in `dns.lookup()` and `{@link lookup}`. The value could be:
*
* * `ipv4first`: sets default `verbatim` `false`.
* * `verbatim`: sets default `verbatim` `true`.
* * `ipv4first`: sets default `order` to `ipv4first`.
* * `ipv6first`: sets default `order` to `ipv6first`.
* * `verbatim`: sets default `order` to `verbatim`.
*
* The default is `verbatim` and [dnsPromises.setDefaultResultOrder()](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
* have higher priority than [`--dns-result-order`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--dns-result-orderorder).
* When using [worker threads](https://nodejs.org/docs/latest-v20.x/api/worker_threads.html), [`dnsPromises.setDefaultResultOrder()`](https://nodejs.org/docs/latest-v20.x/api/dns.html#dnspromisessetdefaultresultorderorder)
* from the main thread won't affect the default dns orders in workers.
* @since v16.4.0, v14.18.0
* @param order must be `'ipv4first'` or `'verbatim'`.
* @param order must be `'ipv4first'`, `'ipv6first'` or `'verbatim'`.
*/
function setDefaultResultOrder(order: "ipv4first" | "verbatim"): void;
function setDefaultResultOrder(order: "ipv4first" | "ipv6first" | "verbatim"): void;
const NODATA: "NODATA";
const FORMERR: "FORMERR";
const SERVFAIL: "SERVFAIL";
Expand Down
2 changes: 1 addition & 1 deletion types/node/domain.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* will be notified, rather than losing the context of the error in the `process.on('uncaughtException')` handler, or causing the program to
* exit immediately with an error code.
* @deprecated Since v1.4.2 - Deprecated
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/domain.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/domain.js)
*/
declare module "domain" {
import EventEmitter = require("node:events");
Expand Down
24 changes: 22 additions & 2 deletions types/node/events.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* });
* myEmitter.emit('event');
* ```
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/events.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/events.js)
*/
declare module "events" {
import { AsyncResource, AsyncResourceOptions } from "node:async_hooks";
Expand Down Expand Up @@ -76,7 +76,27 @@ declare module "events" {
captureRejections?: boolean | undefined;
}
interface StaticEventEmitterOptions {
/**
* Can be used to cancel awaiting events.
*/
signal?: AbortSignal | undefined;
/**
* Names of events that will end the iteration.
*/
close?: string[] | undefined;
/**
* The high watermark. The emitter is paused every time the size
* of events being buffered is higher than it. Supported only
* on emitters implementing `pause()` and `resume()` methods.
* @default `Number.MAX_SAFE_INTEGER`
*/
highWaterMark?: number | undefined;
/**
* The low watermark. The emitter is resumed every time the size of events being buffered
* is lower than it. Supported only on emitters implementing `pause()` and `resume()` methods.
* @default 1
*/
lowWaterMark?: number | undefined;
}
interface EventEmitter<T extends EventMap<T> = DefaultEventMap> extends NodeJS.EventEmitter<T> {}
type EventMap<T> = Record<keyof T, any[]> | DefaultEventMap;
Expand Down Expand Up @@ -196,7 +216,7 @@ declare module "events" {
static once(
emitter: NodeJS.EventEmitter,
eventName: string | symbol,
options?: StaticEventEmitterOptions,
options?: Pick<StaticEventEmitterOptions, "signal">,
): Promise<any[]>;
static once(emitter: EventTarget, eventName: string, options?: StaticEventEmitterOptions): Promise<any[]>;
/**
Expand Down
5 changes: 3 additions & 2 deletions types/node/fs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* All file system operations have synchronous, callback, and promise-based
* forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
* @see [source](https://github.com/nodejs/node/blob/v20.12.2/lib/fs.js)
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/fs.js)
*/
declare module "fs" {
import * as stream from "node:stream";
Expand Down Expand Up @@ -77,7 +77,7 @@ declare module "fs" {
* their synchronous counterparts are of this type.
* If `bigint` in the `options` passed to those methods is true, the numeric values
* will be `bigint` instead of `number`, and the object will contain additional
* nanosecond-precision properties suffixed with `Ns`.
* nanosecond-precision properties suffixed with `Ns`. `Stat` objects are not to be created directly using the `new` keyword.
*
* ```console
* Stats {
Expand Down Expand Up @@ -128,6 +128,7 @@ declare module "fs" {
* ctime: Mon, 10 Oct 2011 23:24:11 GMT,
* birthtime: Mon, 10 Oct 2011 23:24:11 GMT }
* ```
* @deprecated Since v20.13.0. Public constructor is deprecated.
* @since v0.1.21
*/
export class Stats {}
Expand Down
Loading