Socket
Socket
Sign inDemoInstall

@types/node

Package Overview
Dependencies
Maintainers
1
Versions
1924
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/node - npm Package Compare versions

Comparing version 18.16.3 to 20.0.0

141

node/assert.d.ts
/**
* The `assert` module provides a set of assertion functions for verifying
* The `node:assert` module provides a set of assertion functions for verifying
* invariants.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/assert.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/assert.js)
*/

@@ -15,4 +15,3 @@ declare module 'assert' {

/**
* Indicates the failure of an assertion. All errors thrown by the `assert` module
* will be instances of the `AssertionError` class.
* Indicates the failure of an assertion. All errors thrown by the `node:assert`module will be instances of the `AssertionError` class.
*/

@@ -51,3 +50,3 @@ class AssertionError extends Error {

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*

@@ -83,8 +82,7 @@ * // Creates call tracker.

* assert.deepStrictEqual(tracker.getCalls(callsfunc),
* [{ thisArg: this, arguments: [1, 2, 3 ] }]);
* [{ thisArg: undefined, arguments: [1, 2, 3] }]);
* ```
*
* @since v18.8.0, v16.18.0
* @params fn
* @returns An Array with the calls to a tracked function.
* @param fn
* @return An Array with all the calls to a tracked function.
*/

@@ -97,3 +95,3 @@ getCalls(fn: Function): CallTrackerCall[];

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*

@@ -105,4 +103,2 @@ * // Creates call tracker.

*
* function foo() {}
*
* // Returns a function that wraps func() that must be called exact times

@@ -113,3 +109,3 @@ * // before tracker.verify().

* // Returns an array containing information on callsfunc()
* tracker.report();
* console.log(tracker.report());
* // [

@@ -127,3 +123,3 @@ * // {

* @since v14.2.0, v12.19.0
* @return of objects containing information about the wrapper functions returned by `calls`.
* @return An Array of objects containing information about the wrapper functions returned by `calls`.
*/

@@ -146,8 +142,7 @@ report(): CallTrackerReportInformation[];

* // Tracker was called once
* tracker.getCalls(callsfunc).length === 1;
* assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
*
* tracker.reset(callsfunc);
* tracker.getCalls(callsfunc).length === 0;
* assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
* ```
*
* @since v18.8.0, v16.18.0

@@ -162,3 +157,3 @@ * @param fn a tracked function to reset.

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*

@@ -205,3 +200,3 @@ * // Creates call tracker.

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -244,3 +239,3 @@ * assert.fail();

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -280,3 +275,3 @@ * assert.ok(true);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -306,3 +301,3 @@ * // Using `assert()` works the same:

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*

@@ -340,3 +335,3 @@ * assert.equal(1, 1);

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*

@@ -388,20 +383,20 @@ * assert.notEqual(1, 2);

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*
* const obj1 = {
* a: {
* b: 1
* }
* b: 1,
* },
* };
* const obj2 = {
* a: {
* b: 2
* }
* b: 2,
* },
* };
* const obj3 = {
* a: {
* b: 1
* }
* b: 1,
* },
* };
* const obj4 = Object.create(obj1);
* const obj4 = { __proto__: obj1 };
*

@@ -432,3 +427,3 @@ * assert.notDeepEqual(obj1, obj1);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -471,3 +466,3 @@ * assert.strictEqual(1, 2);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -503,3 +498,3 @@ * assert.notStrictEqual(1, 2);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -535,3 +530,3 @@ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -543,3 +538,3 @@ * const err = new TypeError('Wrong value');

* nested: true,
* baz: 'text'
* baz: 'text',
* };

@@ -557,12 +552,12 @@ * err.reg = /abc/i;

* nested: true,
* baz: 'text'
* }
* baz: 'text',
* },
* // Only properties on the validation object will be tested for.
* // Using nested objects requires all properties to be present. Otherwise
* // the validation is going to fail.
* }
* },
* );
*
* // Using regular expressions to validate error properties:
* throws(
* assert.throws(
* () => {

@@ -581,3 +576,3 @@ * throw err;

* // It is not possible to use regular expressions for nested properties!
* baz: 'text'
* baz: 'text',
* },

@@ -587,8 +582,8 @@ * // The `reg` property contains a regular expression and only if the

* // to pass.
* reg: /abc/i
* }
* reg: /abc/i,
* },
* );
*
* // Fails due to the different `message` and `name` properties:
* throws(
* assert.throws(
* () => {

@@ -604,3 +599,3 @@ * const otherErr = new Error('Not found');

* // an error as validation object.
* err
* err,
* );

@@ -612,3 +607,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -619,3 +614,3 @@ * assert.throws(

* },
* Error
* Error,
* );

@@ -630,3 +625,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -637,3 +632,3 @@ * assert.throws(

* },
* /^Error: Wrong value$/
* /^Error: Wrong value$/,
* );

@@ -648,3 +643,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -665,3 +660,3 @@ * assert.throws(

* },
* 'unexpected error'
* 'unexpected error',
* );

@@ -676,3 +671,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -733,3 +728,3 @@ * function throwingFirst() {

* If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
* function. See {@link throws} for more details.

@@ -741,3 +736,3 @@ *

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -748,3 +743,3 @@ * assert.doesNotThrow(

* },
* SyntaxError
* SyntaxError,
* );

@@ -757,3 +752,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -764,3 +759,3 @@ * assert.doesNotThrow(

* },
* TypeError
* TypeError,
* );

@@ -772,3 +767,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -780,3 +775,3 @@ * assert.doesNotThrow(

* /Wrong value/,
* 'Whoops'
* 'Whoops',
* );

@@ -795,3 +790,3 @@ * // Throws: AssertionError: Got unwanted exception: Whoops

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -842,3 +837,3 @@ * assert.ifError(null);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -851,4 +846,4 @@ * await assert.rejects(

* name: 'TypeError',
* message: 'Wrong value'
* }
* message: 'Wrong value',
* },
* );

@@ -858,3 +853,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -869,3 +864,3 @@ * await assert.rejects(

* return true;
* }
* },
* );

@@ -875,7 +870,7 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*
* assert.rejects(
* Promise.reject(new Error('Wrong value')),
* Error
* Error,
* ).then(() => {

@@ -910,3 +905,3 @@ * // ...

* If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
* function. See {@link throws} for more details.

@@ -917,3 +912,3 @@ *

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -924,3 +919,3 @@ * await assert.doesNotReject(

* },
* SyntaxError
* SyntaxError,
* );

@@ -930,3 +925,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -946,3 +941,3 @@ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -970,3 +965,3 @@ * assert.match('I will fail', /pass/);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -973,0 +968,0 @@ * assert.doesNotMatch('I will fail', /fail/);

/**
* The `async_hooks` module provides an API to track asynchronous resources. It
* can be accessed using:
* We strongly discourage the use of the `async_hooks` API.
* Other APIs that can cover most of its use cases include:
*
* * `AsyncLocalStorage` tracks async context
* * `process.getActiveResourcesInfo()` tracks active resources
*
* The `node:async_hooks` module provides an API to track asynchronous resources.
* It can be accessed using:
*
* ```js
* import async_hooks from 'async_hooks';
* import async_hooks from 'node:async_hooks';
* ```
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/async_hooks.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/async_hooks.js)
*/

@@ -14,3 +20,4 @@ declare module 'async_hooks' {

* ```js
* import { executionAsyncId } from 'async_hooks';
* import { executionAsyncId } from 'node:async_hooks';
* import fs from 'node:fs';
*

@@ -55,4 +62,4 @@ * console.log(executionAsyncId()); // 1 - bootstrap

* ```js
* import { open } from 'fs';
* import { executionAsyncId, executionAsyncResource } from 'async_hooks';
* import { open } from 'node:fs';
* import { executionAsyncId, executionAsyncResource } from 'node:async_hooks';
*

@@ -69,7 +76,7 @@ * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}

* ```js
* import { createServer } from 'http';
* import { createServer } from 'node:http';
* import {
* executionAsyncId,
* executionAsyncResource,
* createHook
* createHook,
* } from 'async_hooks';

@@ -84,3 +91,3 @@ * const sym = Symbol('state'); // Private symbol to avoid pollution

* }
* }
* },
* }).enable();

@@ -174,7 +181,7 @@ *

* ```js
* import { createHook } from 'async_hooks';
* import { createHook } from 'node:async_hooks';
*
* const asyncHook = createHook({
* init(asyncId, type, triggerAsyncId, resource) { },
* destroy(asyncId) { }
* destroy(asyncId) { },
* });

@@ -231,3 +238,3 @@ * ```

* ```js
* import { AsyncResource, executionAsyncId } from 'async_hooks';
* import { AsyncResource, executionAsyncId } from 'node:async_hooks';
*

@@ -238,3 +245,3 @@ * // AsyncResource() is meant to be extended. Instantiating a

* const asyncResource = new AsyncResource(
* type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }
* type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false },
* );

@@ -273,5 +280,2 @@ *

* Binds the given function to the current execution context.
*
* The returned function will have an `asyncResource` property referencing
* the `AsyncResource` to which the function is bound.
* @since v14.8.0, v12.19.0

@@ -285,10 +289,5 @@ * @param fn The function to bind to the current execution context.

thisArg?: ThisArg
): Func & {
asyncResource: AsyncResource;
};
): Func;
/**
* Binds the given function to execute to this `AsyncResource`'s scope.
*
* The returned function will have an `asyncResource` property referencing
* the `AsyncResource` to which the function is bound.
* @since v14.8.0, v12.19.0

@@ -299,5 +298,3 @@ * @param fn The function to bind to the current `AsyncResource`.

fn: Func
): Func & {
asyncResource: AsyncResource;
};
): Func;
/**

@@ -335,5 +332,5 @@ * Call the provided function with the provided arguments in the execution context

*
* While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe
* implementation that involves significant optimizations that are non-obvious to
* implement.
* While you can create your own implementation on top of the `node:async_hooks`module, `AsyncLocalStorage` should be preferred as it is a performant and memory
* safe implementation that involves significant optimizations that are non-obvious
* to implement.
*

@@ -345,4 +342,4 @@ * The following example uses `AsyncLocalStorage` to build a simple logger

* ```js
* import http from 'http';
* import { AsyncLocalStorage } from 'async_hooks';
* import http from 'node:http';
* import { AsyncLocalStorage } from 'node:async_hooks';
*

@@ -385,17 +382,40 @@ * const asyncLocalStorage = new AsyncLocalStorage();

* Binds the given function to the current execution context.
* @since v18.16.0
* @since v19.8.0
* @experimental
* @param fn The function to bind to the current execution context.
* @returns A new function that calls `fn` within the captured execution context.
* @return A new function that calls `fn` within the captured execution context.
*/
static bind<Func extends (...args: any[]) => any>(fn: Func): Func & {
asyncResource: AsyncResource;
};
static bind<Func extends (...args: any[]) => any>(
fn: Func
): Func;
/**
* Captures the current execution context and returns a function that accepts a function as an argument.
* Whenever the returned function is called, it calls the function passed to it within the captured context.
* @since v18.16.0
* Captures the current execution context and returns a function that accepts a
* function as an argument. Whenever the returned function is called, it
* calls the function passed to it within the captured context.
*
* ```js
* const asyncLocalStorage = new AsyncLocalStorage();
* const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
* const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
* console.log(result); // returns 123
* ```
*
* AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple
* async context tracking purposes, for example:
*
* ```js
* class Foo {
* #runInAsyncScope = AsyncLocalStorage.snapshot();
*
* get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); }
* }
*
* const foo = asyncLocalStorage.run(123, () => new Foo());
* console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123
* ```
* @since v19.8.0
* @experimental
* @return A new function with the signature `(fn: (...args) : R, ...args) : R`.
*/
static snapshot(): (<R, TArgs extends any[]>(fn: (...args: TArgs) => R, ...args: TArgs) => R) & {
asyncResource: AsyncResource;
};
static snapshot(): <R, TArgs extends any[]>(fn: (...args: TArgs) => R, ...args: TArgs) => R;
/**

@@ -402,0 +422,0 @@ * Disables the instance of `AsyncLocalStorage`. All subsequent calls

@@ -11,8 +11,8 @@ /**

* ```js
* import cluster from 'cluster';
* import http from 'http';
* import { cpus } from 'os';
* import process from 'process';
* import cluster from 'node:cluster';
* import http from 'node:http';
* import { availableParallelism } from 'node:os';
* import process from 'node:process';
*
* const numCPUs = cpus().length;
* const numCPUs = availableParallelism();
*

@@ -54,3 +54,3 @@ * if (cluster.isPrimary) {

* 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/v18.0.0/lib/cluster.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/cluster.js)
*/

@@ -188,3 +188,3 @@ declare module 'cluster' {

* } else if (cluster.isWorker) {
* const net = require('net');
* const net = require('node:net');
* const server = net.createServer((socket) => {

@@ -219,8 +219,8 @@ * // Connections never end

* ```js
* import cluster from 'cluster';
* import http from 'http';
* import { cpus } from 'os';
* import process from 'process';
* import cluster from 'node:cluster';
* import http from 'node:http';
* import { availableParallelism } from 'node:os';
* import process from 'node:process';
*
* const numCPUs = cpus().length;
* const numCPUs = availableParallelism();
*

@@ -227,0 +227,0 @@ * if (cluster.isPrimary) {

/**
* The `console` module provides a simple debugging console that is similar to the
* JavaScript console mechanism provided by web browsers.
* The `node:console` module provides a simple debugging console that is similar to
* the JavaScript console mechanism provided by web browsers.
*
* The module exports two specific components:
*
* * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
* * A `Console` class with methods such as `console.log()`, `console.error()`, and`console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('node:console')`.
*

@@ -56,3 +56,3 @@ * _**Warning**_: The global console object's methods are neither consistently

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/console.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/console.js)
*/

@@ -59,0 +59,0 @@ declare module 'console' {

/**
* The `dgram` module provides an implementation of UDP datagram sockets.
* The `node:dgram` module provides an implementation of UDP datagram sockets.
*
* ```js
* import dgram from 'dgram';
* import dgram from 'node:dgram';
*

@@ -10,3 +10,3 @@ * const server = dgram.createSocket('udp4');

* server.on('error', (err) => {
* console.log(`server error:\n${err.stack}`);
* console.error(`server error:\n${err.stack}`);
* server.close();

@@ -27,3 +27,3 @@ * });

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dgram.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/dgram.js)
*/

@@ -103,4 +103,4 @@ declare module 'dgram' {

* ```js
* import cluster from 'cluster';
* import dgram from 'dgram';
* import cluster from 'node:cluster';
* import dgram from 'node:dgram';
*

@@ -122,3 +122,3 @@ * if (cluster.isPrimary) {

* Returns an object containing the address information for a socket.
* For UDP sockets, this object will contain `address`, `family` and `port`properties.
* For UDP sockets, this object will contain `address`, `family`, and `port`properties.
*

@@ -149,3 +149,3 @@ * This method throws `EBADF` if called on an unbound socket.

* ```js
* import dgram from 'dgram';
* import dgram from 'node:dgram';
*

@@ -155,3 +155,3 @@ * const server = dgram.createSocket('udp4');

* server.on('error', (err) => {
* console.log(`server error:\n${err.stack}`);
* console.error(`server error:\n${err.stack}`);
* server.close();

@@ -293,4 +293,4 @@ * });

* ```js
* import dgram from 'dgram';
* import { Buffer } from 'buffer';
* import dgram from 'node:dgram';
* import { Buffer } from 'node:buffer';
*

@@ -307,4 +307,4 @@ * const message = Buffer.from('Some bytes');

* ```js
* import dgram from 'dgram';
* import { Buffer } from 'buffer';
* import dgram from 'node:dgram';
* import { Buffer } from 'node:buffer';
*

@@ -327,4 +327,4 @@ * const buf1 = Buffer.from('Some ');

* ```js
* import dgram from 'dgram';
* import { Buffer } from 'buffer';
* import dgram from 'node:dgram';
* import { Buffer } from 'node:buffer';
*

@@ -331,0 +331,0 @@ * const message = Buffer.from('Some bytes');

/**
* The `diagnostics_channel` module provides an API to create named channels
* The `node:diagnostics_channel` module provides an API to create named channels
* to report arbitrary message data for diagnostics purposes.

@@ -8,3 +8,3 @@ *

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
* ```

@@ -23,4 +23,4 @@ *

* other modules.
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/diagnostics_channel.js)
* @since v15.1.0, v14.17.0
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/diagnostics_channel.js)
*/

@@ -36,3 +36,3 @@ declare module 'diagnostics_channel' {

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -49,3 +49,3 @@ * if (diagnostics_channel.hasSubscribers('my-channel')) {

/**
* This is the primary entry-point for anyone wanting to interact with a named
* This is the primary entry-point for anyone wanting to publish to a named
* channel. It produces a channel object which is optimized to reduce overhead at

@@ -55,3 +55,3 @@ * publish time as much as possible.

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -67,8 +67,8 @@ * const channel = diagnostics_channel.channel('my-channel');

/**
* Register a message handler to subscribe to this channel. This message handler will be run synchronously
* whenever a message is published to the channel. Any errors thrown in the message handler will
* trigger an 'uncaughtException'.
* Register a message handler to subscribe to this channel. This message handler
* will be run synchronously whenever a message is published to the channel. Any
* errors thrown in the message handler will trigger an `'uncaughtException'`.
*
* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -79,3 +79,2 @@ * diagnostics_channel.subscribe('my-channel', (message, name) => {

* ```
*
* @since v18.7.0, v16.17.0

@@ -87,9 +86,9 @@ * @param name The channel name

/**
* Remove a message handler previously registered to this channel with diagnostics_channel.subscribe(name, onMessage).
* Remove a message handler previously registered to this channel with {@link subscribe}.
*
* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*
* function onMessage(message, name) {
* // Received data
* // Received data
* }

@@ -101,7 +100,6 @@ *

* ```
*
* @since v18.7.0, v16.17.0
* @param name The channel name
* @param onMessage The previous subscribed handler to remove
* @returns `true` if the handler was found, `false` otherwise
* @return `true` if the handler was found, `false` otherwise.
*/

@@ -111,3 +109,3 @@ function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean;

* The class `Channel` represents an individual named channel within the data
* pipeline. It is use to track subscribers and to publish messages when there
* pipeline. It is used to track subscribers and to publish messages when there
* are subscribers present. It exists as a separate object to avoid channel

@@ -129,3 +127,3 @@ * lookups at publish time, enabling very fast publish speeds and allowing

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -143,8 +141,7 @@ * const channel = diagnostics_channel.channel('my-channel');

/**
* Publish a message to any subscribers to the channel. This will
* trigger message handlers synchronously so they will execute within
* the same context.
* Publish a message to any subscribers to the channel. This will trigger
* message handlers synchronously so they will execute within the same context.
*
* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -154,3 +151,3 @@ * const channel = diagnostics_channel.channel('my-channel');

* channel.publish({
* some: 'message'
* some: 'message',
* });

@@ -168,3 +165,3 @@ * ```

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -178,2 +175,3 @@ * const channel = diagnostics_channel.channel('my-channel');

* @since v15.1.0, v14.17.0
* @deprecated Since v18.7.0,v16.17.0 - Use {@link subscribe(name, onMessage)}
* @param onMessage The handler to receive channel messages

@@ -186,3 +184,3 @@ */

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -200,2 +198,3 @@ * const channel = diagnostics_channel.channel('my-channel');

* @since v15.1.0, v14.17.0
* @deprecated Since v18.7.0,v16.17.0 - Use {@link unsubscribe(name, onMessage)}
* @param onMessage The previous subscribed handler to remove

@@ -202,0 +201,0 @@ * @return `true` if the handler was found, `false` otherwise.

/**
* The `dns` module enables name resolution. For example, use it to look up IP
* The `node:dns` module enables name resolution. For example, use it to look up IP
* addresses of host names.

@@ -12,3 +12,3 @@ *

* ```js
* const dns = require('dns');
* const dns = require('node:dns');
*

@@ -21,3 +21,3 @@ * dns.lookup('example.org', (err, address, family) => {

*
* All other functions in the `dns` module connect to an actual DNS server to
* All other functions in the `node:dns` module connect to an actual DNS server to
* perform name resolution. They will always use the network to perform DNS

@@ -28,3 +28,3 @@ * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform

* ```js
* const dns = require('dns');
* const dns = require('node:dns');
*

@@ -48,3 +48,3 @@ * dns.resolve4('archive.org', (err, addresses) => {

* See the `Implementation considerations section` for more information.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dns.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/dns.js)
*/

@@ -83,4 +83,4 @@ declare module 'dns' {

* AAAA (IPv6) record. All `option` properties are optional. If `options` is an
* integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
* and IPv6 addresses are both returned if found.
* integer, then it must be `4` or `6` – if `options` is `0` or not provided, then
* IPv4 and IPv6 addresses are both returned if found.
*

@@ -97,3 +97,3 @@ * With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the

* The implementation uses an operating system facility that can associate names
* with addresses, and vice versa. This implementation can have subtle but
* with addresses and vice versa. This implementation can have subtle but
* important consequences on the behavior of any Node.js program. Please take some

@@ -105,3 +105,3 @@ * time to consult the `Implementation considerations section` before using`dns.lookup()`.

* ```js
* const dns = require('dns');
* const dns = require('node:dns');
* const options = {

@@ -145,3 +145,3 @@ * family: 6,

* ```js
* const dns = require('dns');
* const dns = require('node:dns');
* dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {

@@ -302,3 +302,3 @@ * console.log(hostname, service);

/**
* Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
* will contain an array of IPv6 addresses.

@@ -345,3 +345,3 @@ * @since v0.1.16

/**
* Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of
* objects with the following properties:

@@ -548,3 +548,3 @@ *

*
* The default is `ipv4first` and {@link setDefaultResultOrder} have higher
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
* priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default

@@ -596,3 +596,3 @@ * dns orders in workers.

* ```js
* const { Resolver } = require('dns');
* const { Resolver } = require('node:dns');
* const resolver = new Resolver();

@@ -607,3 +607,3 @@ * resolver.setServers(['4.4.4.4']);

*
* The following methods from the `dns` module are available:
* The following methods from the `node:dns` module are available:
*

@@ -655,3 +655,3 @@ * * `resolver.getServers()`

*
* If a v4 or v6 address is not specified, it is set to the default, and the
* If a v4 or v6 address is not specified, it is set to the default and the
* operating system will choose a local address automatically.

@@ -658,0 +658,0 @@ *

/**
* The `dns.promises` API provides an alternative set of asynchronous DNS methods
* that return `Promise` objects rather than using callbacks. The API is accessible
* via `require('dns').promises` or `require('dns/promises')`.
* via `require('node:dns').promises` or `require('node:dns/promises')`.
* @since v10.6.0

@@ -55,3 +55,3 @@ */

* protocol. The implementation uses an operating system facility that can
* associate names with addresses, and vice versa. This implementation can have
* associate names with addresses and vice versa. This implementation can have
* subtle but important consequences on the behavior of any Node.js program. Please

@@ -64,3 +64,3 @@ * take some time to consult the `Implementation considerations section` before

* ```js
* const dns = require('dns');
* const dns = require('node:dns');
* const dnsPromises = dns.promises;

@@ -101,3 +101,3 @@ * const options = {

* ```js
* const dnsPromises = require('dns').promises;
* const dnsPromises = require('node:dns').promises;
* dnsPromises.lookupService('127.0.0.1', 22).then((result) => {

@@ -212,3 +212,3 @@ * console.log(result.hostname, result.service);

/**
* Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array
* of objects with the following properties:

@@ -344,3 +344,3 @@ *

*
* The default is `ipv4first` and `dnsPromises.setDefaultResultOrder()` have
* The default is `verbatim` and `dnsPromises.setDefaultResultOrder()` have
* higher priority than `--dns-result-order`. When using `worker threads`,`dnsPromises.setDefaultResultOrder()` from the main thread won't affect the

@@ -347,0 +347,0 @@ * default dns orders in workers.

@@ -15,3 +15,3 @@ /**

* @deprecated Since v1.4.2 - Deprecated
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/domain.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/domain.js)
*/

@@ -67,4 +67,4 @@ declare module 'domain' {

* ```js
* const domain = require('domain');
* const fs = require('fs');
* const domain = require('node:domain');
* const fs = require('node:fs');
* const d = domain.create();

@@ -71,0 +71,0 @@ * d.on('error', (er) => {

@@ -25,3 +25,3 @@ /**

* ```js
* const EventEmitter = require('events');
* import { EventEmitter } from 'node:events';
*

@@ -36,3 +36,3 @@ * class MyEmitter extends EventEmitter {}

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/events.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/events.js)
*/

@@ -43,3 +43,2 @@ declare module 'events' {

// actually starts exporting the class, uncomment below.
// import { EventListener, EventListenerObject } from '__dom-events';

@@ -75,3 +74,2 @@ // /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */

// }
interface EventEmitterOptions {

@@ -102,6 +100,6 @@ /**

/**
* The `EventEmitter` class is defined and exposed by the `events` module:
* The `EventEmitter` class is defined and exposed by the `node:events` module:
*
* ```js
* const EventEmitter = require('events');
* import { EventEmitter } from 'node:events';
* ```

@@ -127,27 +125,24 @@ *

* ```js
* const { once, EventEmitter } = require('events');
* import { once, EventEmitter } from 'node:events';
* import process from 'node:process';
*
* async function run() {
* const ee = new EventEmitter();
* const ee = new EventEmitter();
*
* process.nextTick(() => {
* ee.emit('myevent', 42);
* });
* process.nextTick(() => {
* ee.emit('myevent', 42);
* });
*
* const [value] = await once(ee, 'myevent');
* console.log(value);
* const [value] = await once(ee, 'myevent');
* console.log(value);
*
* const err = new Error('kaboom');
* process.nextTick(() => {
* ee.emit('error', err);
* });
* const err = new Error('kaboom');
* process.nextTick(() => {
* ee.emit('error', err);
* });
*
* try {
* await once(ee, 'myevent');
* } catch (err) {
* console.log('error happened', err);
* }
* try {
* await once(ee, 'myevent');
* } catch (err) {
* console.error('error happened', err);
* }
*
* run();
* ```

@@ -160,3 +155,3 @@ *

* ```js
* const { EventEmitter, once } = require('events');
* import { EventEmitter, once } from 'node:events';
*

@@ -167,3 +162,3 @@ * const ee = new EventEmitter();

* .then(([err]) => console.log('ok', err.message))
* .catch((err) => console.log('error', err.message));
* .catch((err) => console.error('error', err.message));
*

@@ -178,3 +173,3 @@ * ee.emit('error', new Error('boom'));

* ```js
* const { EventEmitter, once } = require('events');
* import { EventEmitter, once } from 'node:events';
*

@@ -207,21 +202,20 @@ * const ee = new EventEmitter();

* ```js
* const { on, EventEmitter } = require('events');
* import { on, EventEmitter } from 'node:events';
* import process from 'node:process';
*
* (async () => {
* const ee = new EventEmitter();
* const ee = new EventEmitter();
*
* // Emit later on
* process.nextTick(() => {
* ee.emit('foo', 'bar');
* ee.emit('foo', 42);
* });
* // Emit later on
* process.nextTick(() => {
* ee.emit('foo', 'bar');
* ee.emit('foo', 42);
* });
*
* for await (const event of on(ee, 'foo')) {
* // The execution of this inner block is synchronous and it
* // processes one event at a time (even with await). Do not use
* // if concurrent execution is required.
* console.log(event); // prints ['bar'] [42]
* }
* // Unreachable here
* })();
* for await (const event of on(ee, 'foo')) {
* // The execution of this inner block is synchronous and it
* // processes one event at a time (even with await). Do not use
* // if concurrent execution is required.
* console.log(event); // prints ['bar'] [42]
* }
* // Unreachable here
* ```

@@ -237,3 +231,5 @@ *

* ```js
* const { on, EventEmitter } = require('events');
* import { on, EventEmitter } from 'node:events';
* import process from 'node:process';
*
* const ac = new AbortController();

@@ -270,3 +266,4 @@ *

* ```js
* const { EventEmitter, listenerCount } = require('events');
* import { EventEmitter, listenerCount } from 'node:events';
*
* const myEmitter = new EventEmitter();

@@ -294,3 +291,3 @@ * myEmitter.on('event', () => {});

* ```js
* const { getEventListeners, EventEmitter } = require('events');
* import { getEventListeners, EventEmitter } from 'node:events';
*

@@ -301,3 +298,3 @@ * {

* ee.on('foo', listener);
* getEventListeners(ee, 'foo'); // [listener]
* console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
* }

@@ -308,3 +305,3 @@ * {

* et.addEventListener('foo', listener);
* getEventListeners(et, 'foo'); // [listener]
* console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
* }

@@ -317,6 +314,3 @@ * ```

* ```js
* const {
* setMaxListeners,
* EventEmitter
* } = require('events');
* import { setMaxListeners, EventEmitter } from 'node:events';
*

@@ -389,2 +383,3 @@ * const target = new EventTarget();

* ```js
* import { EventEmitter } from 'node:events';
* const myEE = new EventEmitter();

@@ -419,2 +414,3 @@ * myEE.on('foo', () => console.log('a'));

* ```js
* import { EventEmitter } from 'node:events';
* const myEE = new EventEmitter();

@@ -455,2 +451,4 @@ * myEE.once('foo', () => console.log('a'));

* ```js
* import { EventEmitter } from 'node:events';
* class MyEmitter extends EventEmitter {}
* const myEmitter = new MyEmitter();

@@ -496,2 +494,3 @@ *

* ```js
* import { EventEmitter } from 'node:events';
* const ee = new EventEmitter();

@@ -565,2 +564,3 @@ *

* ```js
* import { EventEmitter } from 'node:events';
* const emitter = new EventEmitter();

@@ -598,3 +598,3 @@ * emitter.once('log', () => console.log('log once'));

* ```js
* const EventEmitter = require('events');
* import { EventEmitter } from 'node:events';
* const myEmitter = new EventEmitter();

@@ -634,6 +634,5 @@ *

/**
* Returns the number of listeners listening to the event named `eventName`.
*
* If `listener` is provided, it will return how many times the listener
* is found in the list of the listeners of the event.
* Returns the number of listeners listening for the event named `eventName`.
* If `listener` is provided, it will return how many times the listener is found
* in the list of the listeners of the event.
* @since v3.2.0

@@ -683,3 +682,4 @@ * @param eventName The name of the event being listened for

* ```js
* const EventEmitter = require('events');
* import { EventEmitter } from 'node:events';
*
* const myEE = new EventEmitter();

@@ -686,0 +686,0 @@ * myEE.on('foo', () => {});

@@ -44,3 +44,2 @@ /**

import { Interface as ReadlineInterface } from 'node:readline';
interface FileChangeInfo<T extends string | Buffer> {

@@ -119,4 +118,4 @@ eventType: WatchEventType;

/**
* Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream
* returned by this method has a default `highWaterMark` of 64 kb.
* Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
* returned by this method has a default `highWaterMark` of 64 KiB.
*

@@ -139,3 +138,3 @@ * `options` can include `start` and `end` values to read a range of bytes from

* ```js
* import { open } from 'fs/promises';
* import { open } from 'node:fs/promises';
*

@@ -166,3 +165,3 @@ * const fd = await open('/dev/input/event0');

* ```js
* import { open } from 'fs/promises';
* import { open } from 'node:fs/promises';
*

@@ -206,3 +205,3 @@ * const fd = await open('sample.txt');

* @since v10.0.0
* @return Fufills with `undefined` upon success.
* @return Fulfills with `undefined` upon success.
*/

@@ -228,7 +227,9 @@ sync(): Promise<void>;

*
* An error will be thrown if this method is called more than once or is called after the `FileHandle` is closed
* or closing.
* An error will be thrown if this method is called more than once or is called
* after the `FileHandle` is closed or closing.
*
* ```js
* import { open } from 'node:fs/promises';
* import {
* open,
* } from 'node:fs/promises';
*

@@ -243,4 +244,4 @@ * const file = await open('./some/file/to/read');

*
* While the `ReadableStream` will read the file to completion, it will not close the `FileHandle` automatically. User code must still call the `fileHandle.close()` method.
*
* While the `ReadableStream` will read the file to completion, it will not
* close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method.
* @since v17.0.0

@@ -299,3 +300,4 @@ * @experimental

/**
* Convenience method to create a `readline` interface and stream over the file. For example:
* Convenience method to create a `readline` interface and stream over the file.
* See `filehandle.createReadStream()` for the options.
*

@@ -311,5 +313,3 @@ * ```js

* ```
*
* @since v18.11.0
* @param options See `filehandle.createReadStream()` for the options.
*/

@@ -341,3 +341,3 @@ readLines(options?: CreateReadStreamOptions): ReadlineInterface;

* ```js
* import { open } from 'fs/promises';
* import { open } from 'node:fs/promises';
*

@@ -369,3 +369,3 @@ * let filehandle = null;

* Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
* [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
* [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
* [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.

@@ -400,6 +400,6 @@ * The promise is resolved with no arguments upon success.

* @since v10.0.0
* @param [offset=0] The start position from within `buffer` where the data to write begins.
* @param offset The start position from within `buffer` where the data to write begins.
* @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write.
* @param position The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current position.
* See the POSIX pwrite(2) documentation for more detail.
* @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current
* position. See the POSIX pwrite(2) documentation for more detail.
*/

@@ -435,3 +435,3 @@ write<TBuffer extends Uint8Array>(

* @since v12.9.0
* @param position The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current
* @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current
* position.

@@ -443,3 +443,3 @@ */

* @since v13.13.0, v12.17.0
* @param position The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
* @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
* @return Fulfills upon success an object containing two properties:

@@ -453,3 +453,3 @@ */

* ```js
* import { open } from 'fs/promises';
* import { open } from 'node:fs/promises';
*

@@ -468,5 +468,3 @@ * let filehandle;

}
const constants: typeof fsConstants;
/**

@@ -485,4 +483,3 @@ * Tests a user's permissions for the file or directory specified by `path`.

* ```js
* import { access } from 'fs/promises';
* import { constants } from 'fs';
* import { access, constants } from 'node:fs/promises';
*

@@ -516,4 +513,3 @@ * try {

* ```js
* import { constants } from 'fs';
* import { copyFile } from 'fs/promises';
* import { copyFile, constants } from 'node:fs/promises';
*

@@ -524,3 +520,3 @@ * try {

* } catch {
* console.log('The file could not be copied');
* console.error('The file could not be copied');
* }

@@ -533,3 +529,3 @@ *

* } catch {
* console.log('The file could not be copied');
* console.error('The file could not be copied');
* }

@@ -596,2 +592,15 @@ * ```

* rejection only when `recursive` is false.
*
* ```js
* import { mkdir } from 'node:fs/promises';
*
* try {
* const projectFolder = new URL('./test/project/', import.meta.url);
* const createDir = await mkdir(projectFolder, { recursive: true });
*
* console.log(`created ${createDir}`);
* } catch (err) {
* console.error(err.message);
* }
* ```
* @since v10.0.0

@@ -639,3 +648,3 @@ * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`.

* ```js
* import { readdir } from 'fs/promises';
* import { readdir } from 'node:fs/promises';
*

@@ -728,7 +737,9 @@ * try {

*
* The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. Windows junction points require the destination path
* to be absolute. When using `'junction'`, the `target` argument will
* The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will
* autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not
* exist, `'file'` will be used. Windows junction points require the destination
* path to be absolute. When using `'junction'`, the `target` argument will
* automatically be normalized to absolute path.
* @since v10.0.0
* @param [type='file']
* @param [type='null']
* @return Fulfills with `undefined` upon success.

@@ -775,4 +786,4 @@ */

/**
* @since v18.15.0
* @return Fulfills with an {fs.StatFs} for the file system.
* @since v19.6.0, v18.15.0
* @return Fulfills with the {fs.StatFs} object for the given `path`.
*/

@@ -792,3 +803,2 @@ function statfs(

function statfs(path: PathLike, opts?: StatFsOptions): Promise<StatsFs | BigIntStatsFs>;
/**

@@ -849,3 +859,3 @@ * Creates a new link from the `existingPath` to the `newPath`. See the POSIX [`link(2)`](http://man7.org/linux/man-pages/man2/link.2.html) documentation for more detail.

* numeric string like `'123456789.0'`.
* * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown.
* * If the value can not be converted to a number, or is `NaN`, `Infinity`, or`-Infinity`, an `Error` will be thrown.
* @since v10.0.0

@@ -895,6 +905,8 @@ * @return Fulfills with `undefined` upon success.

* ```js
* import { mkdtemp } from 'fs/promises';
* import { mkdtemp } from 'node:fs/promises';
* import { join } from 'node:path';
* import { tmpdir } from 'node:os';
*
* try {
* await mkdtemp(path.join(os.tmpdir(), 'foo-'));
* await mkdtemp(join(tmpdir(), 'foo-'));
* } catch (err) {

@@ -908,5 +920,5 @@ * console.error(err);

* platform-specific path separator
* (`require('path').sep`).
* (`require('node:path').sep`).
* @since v10.0.0
* @return Fulfills with a string containing the filesystem path of the newly created temporary directory.
* @return Fulfills with a string containing the file system path of the newly created temporary directory.
*/

@@ -928,3 +940,3 @@ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;

* Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
* [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
* [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
* [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.

@@ -952,4 +964,4 @@ *

* ```js
* import { writeFile } from 'fs/promises';
* import { Buffer } from 'buffer';
* import { writeFile } from 'node:fs/promises';
* import { Buffer } from 'node:buffer';
*

@@ -1017,2 +1029,16 @@ * try {

*
* An example of reading a `package.json` file located in the same directory of the
* running code:
*
* ```js
* import { readFile } from 'node:fs/promises';
* try {
* const filePath = new URL('./package.json', import.meta.url);
* const contents = await readFile(filePath, { encoding: 'utf8' });
* console.log(contents);
* } catch (err) {
* console.error(err.message);
* }
* ```
*
* It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a

@@ -1022,3 +1048,3 @@ * request is aborted the promise returned is rejected with an `AbortError`:

* ```js
* import { readFile } from 'fs/promises';
* import { readFile } from 'node:fs/promises';
*

@@ -1102,3 +1128,3 @@ * try {

* ```js
* import { opendir } from 'fs/promises';
* import { opendir } from 'node:fs/promises';
*

@@ -1124,3 +1150,3 @@ * try {

* ```js
* const { watch } = require('fs/promises');
* const { watch } = require('node:fs/promises');
*

@@ -1127,0 +1153,0 @@ * const ac = new AbortController();

/**
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
* separate module.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/https.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/https.js)
*/

@@ -62,18 +62,5 @@ declare module 'https' {

addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
addListener(
event: 'newSession',
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
addListener(
event: 'OCSPRequest',
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
addListener(
event: 'resumeSession',
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;

@@ -88,25 +75,9 @@ addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;

addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
addListener(
event: 'connect',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
addListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
addListener(
event: 'upgrade',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
addListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
emit(event: string, ...args: any[]): boolean;
emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
emit(
event: 'newSession',
sessionId: Buffer,
sessionData: Buffer,
callback: (err: Error, resp: Buffer) => void,
): boolean;
emit(
event: 'OCSPRequest',
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
): boolean;
emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean;
emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;

@@ -122,3 +93,5 @@ emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;

req: InstanceType<Request>,
res: InstanceType<Response> & { req: InstanceType<Request> },
res: InstanceType<Response> & {
req: InstanceType<Request>;
}
): boolean;

@@ -128,3 +101,5 @@ emit(

req: InstanceType<Request>,
res: InstanceType<Response> & { req: InstanceType<Request> },
res: InstanceType<Response> & {
req: InstanceType<Request>;
}
): boolean;

@@ -136,3 +111,5 @@ emit(event: 'clientError', err: Error, socket: Duplex): boolean;

req: InstanceType<Request>,
res: InstanceType<Response> & { req: InstanceType<Request> },
res: InstanceType<Response> & {
req: InstanceType<Request>;
}
): boolean;

@@ -142,18 +119,5 @@ emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;

on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
on(
event: 'newSession',
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
on(
event: 'OCSPRequest',
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
on(
event: 'resumeSession',
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;

@@ -173,18 +137,5 @@ on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;

once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
once(
event: 'newSession',
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
once(
event: 'OCSPRequest',
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
once(
event: 'resumeSession',
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;

@@ -204,18 +155,5 @@ once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;

prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependListener(
event: 'newSession',
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
prependListener(
event: 'OCSPRequest',
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
prependListener(
event: 'resumeSession',
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;

@@ -230,29 +168,10 @@ prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;

prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
prependListener(
event: 'connect',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
prependListener(
event: 'upgrade',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(
event: 'newSession',
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
prependOnceListener(
event: 'OCSPRequest',
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
prependOnceListener(
event: 'resumeSession',
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;

@@ -267,11 +186,5 @@ prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;

prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
prependOnceListener(
event: 'connect',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
prependOnceListener(
event: 'upgrade',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
}

@@ -281,8 +194,8 @@ /**

* // curl -k https://localhost:8000/
* const https = require('https');
* const fs = require('fs');
* const https = require('node:https');
* const fs = require('node:fs');
*
* const options = {
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* };

@@ -299,8 +212,8 @@ *

* ```js
* const https = require('https');
* const fs = require('fs');
* const https = require('node:https');
* const fs = require('node:fs');
*
* const options = {
* pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
* passphrase: 'sample'
* passphrase: 'sample',
* };

@@ -341,3 +254,3 @@ *

* ```js
* const https = require('https');
* const https = require('node:https');
*

@@ -348,3 +261,3 @@ * const options = {

* path: '/',
* method: 'GET'
* method: 'GET',
* };

@@ -376,3 +289,3 @@ *

* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* };

@@ -396,3 +309,3 @@ * options.agent = new https.Agent(options);

* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* agent: false
* agent: false,
* };

@@ -418,5 +331,5 @@ *

* ```js
* const tls = require('tls');
* const https = require('https');
* const crypto = require('crypto');
* const tls = require('node:tls');
* const https = require('node:https');
* const crypto = require('node:crypto');
*

@@ -438,3 +351,3 @@ * function sha256(s) {

*
* // Pin the public key, similar to HPKP pin-sha25 pinning
* // Pin the public key, similar to HPKP pin-sha256 pinning
* const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';

@@ -514,11 +427,4 @@ * if (sha256(cert.pubkey) !== pubkey256) {

*/
function request(
options: RequestOptions | string | URL,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
function request(
url: string | URL,
options: RequestOptions,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
/**

@@ -531,3 +437,3 @@ * Like `http.get()` but for HTTPS.

* ```js
* const https = require('https');
* const https = require('node:https');
*

@@ -549,11 +455,4 @@ * https.get('https://encrypted.google.com/', (res) => {

*/
function get(
options: RequestOptions | string | URL,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
function get(
url: string | URL,
options: RequestOptions,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
let globalAgent: Agent;

@@ -560,0 +459,0 @@ }

@@ -1,2 +0,2 @@

// Type definitions for non-npm package Node.js 18.16
// Type definitions for non-npm package Node.js 20.0
// Project: https://nodejs.org/

@@ -3,0 +3,0 @@ // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>

@@ -13,5 +13,5 @@ /**

* ```js
* const fs = require('fs');
* const assert = require('assert');
* const { syncBuiltinESMExports } = require('module');
* const fs = require('node:fs');
* const assert = require('node:assert');
* const { syncBuiltinESMExports } = require('node:module');
*

@@ -30,3 +30,3 @@ * fs.readFile = newAPI;

*
* import('fs').then((esmFS) => {
* import('node:fs').then((esmFS) => {
* // It syncs the existing readFile property with the new value

@@ -49,2 +49,3 @@ * assert.strictEqual(esmFS.readFile, newAPI);

* @since v13.7.0, v12.17.0
* @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise.
*/

@@ -51,0 +52,0 @@ function findSourceMap(path: string, error?: Error): SourceMap;

/**
* > Stability: 2 - Stable
*
* The `net` module provides an asynchronous network API for creating stream-based
* The `node:net` module provides an asynchronous network API for creating stream-based
* TCP or `IPC` servers ({@link createServer}) and clients

@@ -11,5 +11,5 @@ * ({@link createConnection}).

* ```js
* const net = require('net');
* const net = require('node:net');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/net.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/net.js)
*/

@@ -145,9 +145,6 @@ declare module 'net' {

* Close the TCP connection by sending an RST packet and destroy the stream.
* If this TCP socket is in connecting status, it will send an RST packet
* and destroy this TCP socket once it is connected. Otherwise, it will call
* `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. If this is not a TCP socket
* (for example, a pipe), calling this method will immediately throw
* an `ERR_INVALID_HANDLE_TYPE` Error.
* @since v18.3.0
* @return The socket itself.
* If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected.
* Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error.
* If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error.
* @since v18.3.0, v16.17.0
*/

@@ -275,5 +272,5 @@ resetAndDestroy(): this;

/**
* This is `true` if the socket is not connected yet, either because `.connect()`
* has not yet been called or because it is still in the process of connecting (see `socket.connecting`).
* @since v10.16.0
* This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting
* (see `socket.connecting`).
* @since v11.2.0, v10.16.0
*/

@@ -299,3 +296,3 @@ readonly pending: boolean;

* The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
* @since v18.8.0
* @since v18.8.0, v16.18.0
*/

@@ -305,3 +302,7 @@ readonly localFamily?: string;

* This property represents the state of the connection as a string.
* @see {https://nodejs.org/api/net.html#socketreadystate}
*
* * If the stream is connecting `socket.readyState` is `opening`.
* * If the stream is readable and writable, it is `open`.
* * If the stream is readable and not writable, it is `readOnly`.
* * If the stream is not readable and writable, it is `writeOnly`.
* @since v0.5.0

@@ -327,3 +328,4 @@ */

/**
* The socket timeout in milliseconds as set by socket.setTimeout(). It is undefined if a timeout has not been set.
* The socket timeout in milliseconds as set by `socket.setTimeout()`.
* It is `undefined` if a timeout has not been set.
* @since v10.7.0

@@ -509,3 +511,3 @@ */

* if (e.code === 'EADDRINUSE') {
* console.log('Address in use, retrying...');
* console.error('Address in use, retrying...');
* setTimeout(() => {

@@ -732,3 +734,3 @@ * server.close();

* ```js
* const net = require('net');
* const net = require('node:net');
* const server = net.createServer((c) => {

@@ -871,2 +873,3 @@ * // 'connection' listener.

/**
* Either \`'ipv4'\` or \`'ipv6'\`.
* @since v15.14.0, v14.18.0

@@ -873,0 +876,0 @@ */

/**
* The `os` module provides operating system-related utility methods and
* The `node:os` module provides operating system-related utility methods and
* properties. It can be accessed using:
*
* ```js
* const os = require('os');
* const os = require('node:os');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/os.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/os.js)
*/

@@ -78,2 +78,3 @@ declare module 'os' {

* Returns an array of objects containing information about each logical CPU core.
* The array will be empty if no CPU information is available, such as if the`/proc` file system is unavailable.
*

@@ -92,4 +93,4 @@ * The properties included on each object include:

* idle: 1070356870,
* irq: 0
* }
* irq: 0,
* },
* },

@@ -104,4 +105,4 @@ * {

* idle: 1071569080,
* irq: 0
* }
* irq: 0,
* },
* },

@@ -116,4 +117,4 @@ * {

* idle: 1070919370,
* irq: 0
* }
* irq: 0,
* },
* },

@@ -128,4 +129,4 @@ * {

* idle: 1070905480,
* irq: 20
* }
* irq: 20,
* },
* },

@@ -137,2 +138,5 @@ * ]

* are always 0.
*
* `os.cpus().length` should not be used to calculate the amount of parallelism
* available to an application. Use {@link availableParallelism} for this purpose.
* @since v0.3.3

@@ -142,6 +146,7 @@ */

/**
* Returns an estimate of the default amount of parallelism a program should use. Always returns a value greater than zero.
* Returns an estimate of the default amount of parallelism a program should use.
* Always returns a value greater than zero.
*
* This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).
* @since 18.4.0
* @since v19.4.0, v18.14.0
*/

@@ -432,8 +437,7 @@ function availableParallelism(): number;

/**
* Returns the machine type as a string, such as arm, aarch64, mips, mips64, ppc64, ppc64le, s390, s390x, i386, i686, x86_64.
* Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,`mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`.
*
* On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname).
* On Windows, `RtlGetVersion()` is used, and if it is not available, `GetVersionExW()` will be used.
* See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
* @since v18.9.0
* On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
* available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
* @since v18.9.0, v16.18.0
*/

@@ -440,0 +444,0 @@ function machine(): string;

{
"name": "@types/node",
"version": "18.16.3",
"version": "20.0.0",
"description": "TypeScript definitions for Node.js",

@@ -235,4 +235,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",

"dependencies": {},
"typesPublisherContentHash": "69f2a06d3dd7a1f50c66f61c4e0df5c3791ce3dd65fc61ad18e536db6528487d",
"typesPublisherContentHash": "5401a32b866e277b497fdc027d0aefa53bfa554c5ab72913d68a91eea49d0bc8",
"typeScriptVersion": "4.3"
}

@@ -10,9 +10,9 @@ declare module 'path/posix' {

/**
* The `path` module provides utilities for working with file and directory paths.
* It can be accessed using:
* The `node:path` module provides utilities for working with file and directory
* paths. It can be accessed using:
*
* ```js
* const path = require('path');
* const path = require('node:path');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/path.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/path.js)
*/

@@ -19,0 +19,0 @@ declare module 'path' {

@@ -10,5 +10,6 @@ /**

* * [User Timing](https://www.w3.org/TR/user-timing/)
* * [Resource Timing](https://www.w3.org/TR/resource-timing-2/)
*
* ```js
* const { PerformanceObserver, performance } = require('perf_hooks');
* const { PerformanceObserver, performance } = require('node:perf_hooks');
*

@@ -30,3 +31,3 @@ * const obs = new PerformanceObserver((items) => {

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/perf_hooks.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/perf_hooks.js)
*/

@@ -51,2 +52,3 @@ declare module 'perf_hooks' {

/**
* The constructor of this class is not exposed to users directly.
* @since v8.5.0

@@ -93,2 +95,6 @@ */

}
/**
* Exposes marks created via the `Performance.mark()` method.
* @since v18.2.0, v16.17.0
*/
class PerformanceMark extends PerformanceEntry {

@@ -98,2 +104,8 @@ readonly duration: 0;

}
/**
* Exposes measures created via the `Performance.measure()` method.
*
* The constructor of this class is not exposed to users directly.
* @since v18.2.0, v16.17.0
*/
class PerformanceMeasure extends PerformanceEntry {

@@ -296,4 +308,4 @@ readonly entryType: 'measure';

* performance,
* PerformanceObserver
* } = require('perf_hooks');
* PerformanceObserver,
* } = require('node:perf_hooks');
*

@@ -339,4 +351,4 @@ * const obs = new PerformanceObserver((perfObserverList, observer) => {

* performance,
* PerformanceObserver
* } = require('perf_hooks');
* PerformanceObserver,
* } = require('node:perf_hooks');
*

@@ -389,4 +401,4 @@ * const obs = new PerformanceObserver((perfObserverList, observer) => {

* performance,
* PerformanceObserver
* } = require('perf_hooks');
* PerformanceObserver,
* } = require('node:perf_hooks');
*

@@ -425,2 +437,5 @@ * const obs = new PerformanceObserver((perfObserverList, observer) => {

type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void;
/**
* @since v8.5.0
*/
class PerformanceObserver extends AsyncResource {

@@ -439,4 +454,4 @@ constructor(callback: PerformanceObserverCallback);

* performance,
* PerformanceObserver
* } = require('perf_hooks');
* PerformanceObserver,
* } = require('node:perf_hooks');
*

@@ -560,7 +575,6 @@ * const obs = new PerformanceObserver((list, observer) => {

/**
* Adds the values from other to this histogram.
* Adds the values from `other` to this histogram.
* @since v17.4.0, v16.14.0
* @param other Recordable Histogram to combine with
*/
add(other: RecordableHistogram): void;
add(other: RecordableHistogram): void;
}

@@ -580,3 +594,3 @@ /**

* ```js
* const { monitorEventLoopDelay } = require('perf_hooks');
* const { monitorEventLoopDelay } = require('node:perf_hooks');
* const h = monitorEventLoopDelay({ resolution: 20 });

@@ -619,3 +633,2 @@ * h.enable();

function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
import { performance as _performance } from 'perf_hooks';

@@ -622,0 +635,0 @@ global {

@@ -27,3 +27,3 @@ /**

* @deprecated Since v7.0.0 - Deprecated
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/punycode.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/punycode.js)
*/

@@ -30,0 +30,0 @@ declare module 'punycode' {

/**
* The `querystring` module provides utilities for parsing and formatting URL
* The `node:querystring` module provides utilities for parsing and formatting URL
* query strings. It can be accessed using:
*
* ```js
* const querystring = require('querystring');
* const querystring = require('node:querystring');
* ```
*
* `querystring` is more performant than `URLSearchParams` but is not a
* standardized API. Use `URLSearchParams` when performance is not critical
* or when compatibility with browser code is desirable.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/querystring.js)
* standardized API. Use `URLSearchParams` when performance is not critical or
* when compatibility with browser code is desirable.
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/querystring.js)
*/

@@ -14,0 +14,0 @@ declare module 'querystring' {

/**
* The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
* The `node:readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
*

@@ -16,3 +16,3 @@ * To use the promise-based APIs:

*
* The following simple example illustrates the basic use of the `readline` module.
* The following simple example illustrates the basic use of the `node:readline`module.
*

@@ -34,3 +34,3 @@ * ```js

* received on the `input` stream.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/readline.js)
*/

@@ -413,7 +413,7 @@ declare module 'readline' {

* ```js
* const readline = require('readline');
* const readline = require('node:readline');
* const rl = readline.createInterface({
* input: process.stdin,
* output: process.stdout,
* prompt: 'OHAI> '
* prompt: 'OHAI> ',
* });

@@ -446,4 +446,4 @@ *

* ```js
* const fs = require('fs');
* const readline = require('readline');
* const fs = require('node:fs');
* const readline = require('node:readline');
*

@@ -455,3 +455,3 @@ * async function processLineByLine() {

* input: fileStream,
* crlfDelay: Infinity
* crlfDelay: Infinity,
* });

@@ -473,8 +473,8 @@ * // Note: we use the crlfDelay option to recognize all instances of CR LF

* ```js
* const fs = require('fs');
* const readline = require('readline');
* const fs = require('node:fs');
* const readline = require('node:readline');
*
* const rl = readline.createInterface({
* input: fs.createReadStream('sample.txt'),
* crlfDelay: Infinity
* crlfDelay: Infinity,
* });

@@ -490,5 +490,5 @@ *

* ```js
* const { once } = require('events');
* const { createReadStream } = require('fs');
* const { createInterface } = require('readline');
* const { once } = require('node:events');
* const { createReadStream } = require('node:fs');
* const { createInterface } = require('node:readline');
*

@@ -499,3 +499,3 @@ * (async function processLineByLine() {

* input: createReadStream('big-file.txt'),
* crlfDelay: Infinity
* crlfDelay: Infinity,
* });

@@ -502,0 +502,0 @@ *

@@ -10,3 +10,2 @@ /**

import { Abortable } from 'node:events';
class Interface extends _Interface {

@@ -49,3 +48,2 @@ /**

}
class Readline {

@@ -55,3 +53,8 @@ /**

*/
constructor(stream: NodeJS.WritableStream, options?: { autoCommit?: boolean });
constructor(
stream: NodeJS.WritableStream,
options?: {
autoCommit?: boolean;
}
);
/**

@@ -86,3 +89,2 @@ * The `rl.clearLine()` method adds to the internal list of pending action an action that clears current line of the associated `stream` in a specified direction identified by `dir`.

}
/**

@@ -89,0 +91,0 @@ * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Sat, 29 Apr 2023 06:32:49 GMT
* Last updated: Fri, 05 May 2023 07:02:50 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`

/**
* The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation that
* is available both as a standalone program or includible in other applications.
* It can be accessed using:
* The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation
* that is available both as a standalone program or includible in other
* applications. It can be accessed using:
*
* ```js
* const repl = require('repl');
* const repl = require('node:repl');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/repl.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/repl.js)
*/

@@ -127,3 +127,3 @@ declare module 'repl' {

* ```js
* const repl = require('repl');
* const repl = require('node:repl');
*

@@ -255,3 +255,3 @@ * const options = { useColors: true };

* ```js
* const repl = require('repl');
* const repl = require('node:repl');
*

@@ -265,3 +265,3 @@ * const replServer = repl.start({ prompt: '> ' });

* this.displayPrompt();
* }
* },
* });

@@ -407,3 +407,3 @@ * replServer.defineCommand('saybye', function saybye() {

* ```js
* const repl = require('repl');
* const repl = require('node:repl');
*

@@ -410,0 +410,0 @@ * // a Unix style prompt

declare module 'stream/consumers' {
import { Blob as NodeBlob } from "node:buffer";
import { Blob as NodeBlob } from 'node:buffer';
import { Readable } from 'node:stream';

@@ -4,0 +4,0 @@ function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;

/**
* The `string_decoder` module provides an API for decoding `Buffer` objects into
* strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
* The `node:string_decoder` module provides an API for decoding `Buffer` objects
* into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
* characters. It can be accessed using:
*
* ```js
* const { StringDecoder } = require('string_decoder');
* const { StringDecoder } = require('node:string_decoder');
* ```

@@ -13,3 +13,3 @@ *

* ```js
* const { StringDecoder } = require('string_decoder');
* const { StringDecoder } = require('node:string_decoder');
* const decoder = new StringDecoder('utf8');

@@ -33,3 +33,3 @@ *

* ```js
* const { StringDecoder } = require('string_decoder');
* const { StringDecoder } = require('node:string_decoder');
* const decoder = new StringDecoder('utf8');

@@ -41,3 +41,3 @@ *

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/string_decoder.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/string_decoder.js)
*/

@@ -44,0 +44,0 @@ declare module 'string_decoder' {

@@ -13,3 +13,2 @@ /**

function run(options?: RunOptions): TestsStream;
/**

@@ -53,3 +52,2 @@ * The `test()` function is the value imported from the test module. Each invocation of this

function test(fn?: TestFn): Promise<void>;
/**

@@ -72,3 +70,2 @@ * @since v18.6.0

function skip(fn?: SuiteFn): void;
// Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.

@@ -80,3 +77,2 @@ function todo(name?: string, options?: TestOptions, fn?: SuiteFn): void;

}
/**

@@ -100,3 +96,2 @@ * @since v18.6.0

function skip(fn?: ItFn): void;
// Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.

@@ -108,3 +103,2 @@ function todo(name?: string, options?: TestOptions, fn?: ItFn): void;

}
/**

@@ -116,3 +110,2 @@ * The type of a function under test. The first argument to this function is a

type TestFn = (t: TestContext, done: (result?: any) => void) => any;
/**

@@ -123,3 +116,2 @@ * The type of a function under Suite.

type SuiteFn = (done: (result?: any) => void) => void;
/**

@@ -130,3 +122,2 @@ * The type of a function under test.

type ItFn = (done: (result?: any) => void) => any;
interface RunOptions {

@@ -141,3 +132,2 @@ /**

concurrency?: number | boolean | undefined;
/**

@@ -148,3 +138,2 @@ * An array containing the list of files to run.

files?: readonly string[] | undefined;
/**

@@ -155,3 +144,2 @@ * Allows aborting an in-progress test execution.

signal?: AbortSignal | undefined;
/**

@@ -163,3 +151,2 @@ * A number of milliseconds the test will fail after.

timeout?: number | undefined;
/**

@@ -172,3 +159,2 @@ * Sets inspector port of test child process.

}
/**

@@ -218,3 +204,2 @@ * A successful call of the `run()` method will return a new `TestsStream` object,

}
interface DiagnosticData {

@@ -225,3 +210,2 @@ /**

message: string;
/**

@@ -232,3 +216,2 @@ * The nesting level of the test.

}
interface TestFail {

@@ -243,3 +226,2 @@ /**

duration: number;
/**

@@ -250,3 +232,2 @@ * The error thrown by the test.

};
/**

@@ -256,3 +237,2 @@ * The test name.

name: string;
/**

@@ -262,3 +242,2 @@ * The nesting level of the test.

nesting: number;
/**

@@ -268,3 +247,2 @@ * The ordinal number of the test.

testNumber: number;
/**

@@ -274,3 +252,2 @@ * Present if `context.todo` is called.

todo?: string | boolean;
/**

@@ -281,3 +258,2 @@ * Present if `context.skip` is called.

}
interface TestPass {

@@ -293,3 +269,2 @@ /**

};
/**

@@ -299,3 +274,2 @@ * The test name.

name: string;
/**

@@ -305,3 +279,2 @@ * The nesting level of the test.

nesting: number;
/**

@@ -311,3 +284,2 @@ * The ordinal number of the test.

testNumber: number;
/**

@@ -317,3 +289,2 @@ * Present if `context.todo` is called.

todo?: string | boolean;
/**

@@ -324,3 +295,2 @@ * Present if `context.skip` is called.

}
interface TestPlan {

@@ -331,3 +301,2 @@ /**

nesting: number;
/**

@@ -338,3 +307,2 @@ * The number of subtests that have ran.

}
interface TestStart {

@@ -345,3 +313,2 @@ /**

name: string;
/**

@@ -352,3 +319,2 @@ * The nesting level of the test.

}
/**

@@ -368,3 +334,2 @@ * An instance of `TestContext` is passed to each test function in order to interact with the

beforeEach: typeof beforeEach;
/**

@@ -378,3 +343,2 @@ * This function is used to create a hook that runs after the current test finishes.

after: typeof after;
/**

@@ -388,3 +352,2 @@ * This function is used to create a hook running after each subtest of the current test.

afterEach: typeof afterEach;
/**

@@ -397,3 +360,2 @@ * This function is used to write diagnostics to the output. Any diagnostic information is

diagnostic(message: string): void;
/**

@@ -404,3 +366,2 @@ * The name of the test.

readonly name: string;
/**

@@ -414,3 +375,2 @@ * If `shouldRunOnlyTests` is truthy, the test context will only run tests that have the `only`

runOnly(shouldRunOnlyTests: boolean): void;
/**

@@ -421,3 +381,2 @@ * Can be used to abort test subtasks when the test has been aborted.

readonly signal: AbortSignal;
/**

@@ -431,3 +390,2 @@ * This function causes the test's output to indicate the test as skipped. If `message` is

skip(message?: string): void;
/**

@@ -441,3 +399,2 @@ * This function adds a `TODO` directive to the test's output. If `message` is provided, it is

todo(message?: string): void;
/**

@@ -461,3 +418,2 @@ * This function is used to create subtests under the current test. This function behaves in

}
interface TestOptions {

@@ -473,3 +429,2 @@ /**

concurrency?: number | boolean | undefined;
/**

@@ -481,3 +436,2 @@ * If truthy, and the test context is configured to run `only` tests, then this test will be

only?: boolean | undefined;
/**

@@ -488,3 +442,2 @@ * Allows aborting an in-progress test.

signal?: AbortSignal | undefined;
/**

@@ -496,3 +449,2 @@ * If truthy, the test is skipped. If a string is provided, that string is displayed in the

skip?: boolean | string | undefined;
/**

@@ -505,3 +457,2 @@ * A number of milliseconds the test will fail after. If unspecified, subtests inherit this

timeout?: number | undefined;
/**

@@ -514,3 +465,2 @@ * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in

}
/**

@@ -524,3 +474,2 @@ * This function is used to create a hook running before running a suite.

function before(fn?: HookFn, options?: HookOptions): void;
/**

@@ -534,3 +483,2 @@ * This function is used to create a hook running after running a suite.

function after(fn?: HookFn, options?: HookOptions): void;
/**

@@ -544,3 +492,2 @@ * This function is used to create a hook running before each subtest of the current suite.

function beforeEach(fn?: HookFn, options?: HookOptions): void;
/**

@@ -554,3 +501,2 @@ * This function is used to create a hook running after each subtest of the current test.

function afterEach(fn?: HookFn, options?: HookOptions): void;
/**

@@ -561,3 +507,2 @@ * The hook function. If the hook uses callbacks, the callback function is passed as the

type HookFn = (done: (result?: any) => void) => any;
/**

@@ -572,3 +517,2 @@ * Configuration options for hooks.

signal?: AbortSignal | undefined;
/**

@@ -581,3 +525,2 @@ * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this

}
interface MockFunctionOptions {

@@ -593,3 +536,2 @@ /**

}
interface MockMethodOptions extends MockFunctionOptions {

@@ -601,3 +543,2 @@ /**

getter?: boolean | undefined;
/**

@@ -609,13 +550,9 @@ * If `true`, `object[methodName]` is treated as a setter.

}
type Mock<F extends Function> = F & {
mock: MockFunctionContext<F>;
};
type NoOpFunction = (...args: any[]) => undefined;
type FunctionPropertyNames<T> = {
[K in keyof T]: T[K] extends Function ? K : never;
}[keyof T];
interface MockTracker {

@@ -631,3 +568,2 @@ /**

fn<F extends Function = NoOpFunction, Implementation extends Function = F>(original?: F, implementation?: Implementation, options?: MockFunctionOptions): Mock<F | Implementation>;
/**

@@ -695,3 +631,2 @@ * This function is used to create a mock on an existing object method.

): Mock<(() => MockedObject[MethodName]) | Implementation>;
/**

@@ -718,3 +653,2 @@ * This function is syntax sugar for {@link MockTracker.method} with `options.setter` set to `true`.

): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
/**

@@ -729,3 +663,2 @@ * This function restores the default behavior of all mocks that were previously created by this `MockTracker`

reset(): void;
/**

@@ -737,5 +670,3 @@ * This function restores the default behavior of all mocks that were previously created by this `MockTracker`.

}
const mock: MockTracker;
interface MockFunctionCall<

@@ -782,3 +713,2 @@ F extends Function,

}
interface MockFunctionContext<F extends Function> {

@@ -789,3 +719,2 @@ /**

readonly calls: Array<MockFunctionCall<F>>;
/**

@@ -797,3 +726,2 @@ * This function returns the number of times that this mock has been invoked.

callCount(): number;
/**

@@ -804,3 +732,2 @@ * This function is used to change the behavior of an existing mock.

mockImplementation(implementation: Function): void;
/**

@@ -815,3 +742,2 @@ * This function is used to change the behavior of an existing mock for a single invocation.

mockImplementationOnce(implementation: Function, onCall?: number): void;
/**

@@ -821,3 +747,2 @@ * Resets the call history of the mock function.

resetCalls(): void;
/**

@@ -829,4 +754,3 @@ * Resets the implementation of the mock function to its original behavior.

}
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock };
}
/**
* The `timer` module exposes a global API for scheduling functions to
* be called at some future period of time. Because the timer functions are
* globals, there is no need to call `require('timers')` to use the API.
* globals, there is no need to call `require('node:timers')` to use the API.
*

@@ -9,3 +9,3 @@ * The timer functions within Node.js implement a similar API as the timers API

* built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/timers.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/timers.js)
*/

@@ -12,0 +12,0 @@ declare module 'timers' {

/**
* The `timers/promises` API provides an alternative set of timer functions
* that return `Promise` objects. The API is accessible via`require('timers/promises')`.
* that return `Promise` objects. The API is accessible via`require('node:timers/promises')`.
*

@@ -47,2 +47,4 @@ * ```js

* Returns an async iterator that generates values in an interval of `delay` ms.
* If `ref` is `true`, you need to call `next()` of async iterator explicitly
* or implicitly to keep the event loop alive.
*

@@ -66,3 +68,2 @@ * ```js

function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
interface Scheduler {

@@ -90,3 +91,2 @@ /**

}
const scheduler: Scheduler;

@@ -93,0 +93,0 @@ }

/**
* The `tls` module provides an implementation of the Transport Layer Security
* The `node:tls` module provides an implementation of the Transport Layer Security
* (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL.

@@ -7,5 +7,5 @@ * The module can be accessed using:

* ```js
* const tls = require('tls');
* const tls = require('node:tls');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tls.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/tls.js)
*/

@@ -216,3 +216,3 @@ declare module 'tls' {

*
* Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate} will only return data while the
* Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the
* connection is open.

@@ -264,9 +264,9 @@ * @since v0.11.4

*
* For example:
* For example, a TLSv1.2 protocol with AES256-SHA cipher:
*
* ```json
* {
* "name": "AES128-SHA256",
* "standardName": "TLS_RSA_WITH_AES_128_CBC_SHA256",
* "version": "TLSv1.2"
* "name": "AES256-SHA",
* "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA",
* "version": "SSLv3"
* }

@@ -918,3 +918,3 @@ * ```

*
* The `ticketKeys` options is automatically shared between `cluster` module
* The `ticketKeys` options is automatically shared between `node:cluster` module
* workers.

@@ -925,4 +925,4 @@ *

* ```js
* const tls = require('tls');
* const fs = require('fs');
* const tls = require('node:tls');
* const fs = require('node:fs');
*

@@ -937,3 +937,3 @@ * const options = {

* // This is necessary only if the client uses a self-signed certificate.
* ca: [ fs.readFileSync('client-cert.pem') ]
* ca: [ fs.readFileSync('client-cert.pem') ],
* };

@@ -973,4 +973,4 @@ *

* // Assumes an echo server that is listening on port 8000.
* const tls = require('tls');
* const fs = require('fs');
* const tls = require('node:tls');
* const fs = require('node:fs');
*

@@ -1051,3 +1051,4 @@ * const options = {

* The `tls.createSecureContext()` method creates a `SecureContext` object. It is
* usable as an argument to several `tls` APIs, such as {@link createServer} and `server.addContext()`, but has no public methods.
* usable as an argument to several `tls` APIs, such as `server.addContext()`,
* but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option.
*

@@ -1058,2 +1059,8 @@ * A key is _required_ for ciphers that use certificates. Either `key` or`pfx` can be used to provide it.

* CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt).
*
* Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto'`option. When set to `'auto'`, well-known DHE parameters of sufficient strength
* will be selected automatically. Otherwise, if necessary, `openssl dhparam` can
* be used to create custom parameters. The key length must be greater than or
* equal to 1024 bits or else an error will be thrown. Although 1024 bits is
* permissible, use 2048 bits or larger for stronger security.
* @since v0.11.13

@@ -1060,0 +1067,0 @@ */

/**
* The `trace_events` module provides a mechanism to centralize tracing information
* generated by V8, Node.js core, and userspace code.
* The `node:trace_events` module provides a mechanism to centralize tracing
* information generated by V8, Node.js core, and userspace code.
*
* Tracing can be enabled with the `--trace-event-categories` command-line flag
* or by using the `trace_events` module. The `--trace-event-categories` flag
* or by using the `node:trace_events` module. The `--trace-event-categories` flag
* accepts a list of comma-separated category names.

@@ -16,5 +16,15 @@ *

* * `node.console`: Enables capture of `console.time()` and `console.count()`output.
* * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool
* synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
* * `node.threadpoolwork.async`: Enables capture of trace data for threadpool
* asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
* * `node.dns.native`: Enables capture of trace data for DNS queries.
* * `node.net.native`: Enables capture of trace data for network.
* * `node.environment`: Enables capture of Node.js Environment milestones.
* * `node.fs.sync`: Enables capture of trace data for file system sync methods.
* * `node.fs_dir.sync`: Enables capture of trace data for file system sync
* directory methods.
* * `node.fs.async`: Enables capture of trace data for file system async methods.
* * `node.fs_dir.async`: Enables capture of trace data for file system async
* directory methods.
* * `node.perf`: Enables capture of `Performance API` measurements.

@@ -27,4 +37,5 @@ * * `node.perf.usertiming`: Enables capture of only Performance API User Timing

* of unhandled Promise rejections and handled-after-rejections.
* * `node.vm.script`: Enables capture of trace data for the `vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
* * `node.vm.script`: Enables capture of trace data for the `node:vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
* * `v8`: The `V8` events are GC, compiling, and execution related.
* * `node.http`: Enables capture of trace data for http request / response.
*

@@ -48,6 +59,6 @@ * By default the `node`, `node.async_hooks`, and `v8` categories are enabled.

*
* Alternatively, trace events may be enabled using the `trace_events` module:
* Alternatively, trace events may be enabled using the `node:trace_events` module:
*
* ```js
* const trace_events = require('trace_events');
* const trace_events = require('node:trace_events');
* const tracing = trace_events.createTracing({ categories: ['node.perf'] });

@@ -89,3 +100,3 @@ * tracing.enable(); // Enable trace event capture for the 'node.perf' category

* @experimental
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/trace_events.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/trace_events.js)
*/

@@ -139,3 +150,3 @@ declare module 'trace_events' {

* ```js
* const trace_events = require('trace_events');
* const trace_events = require('node:trace_events');
* const categories = ['node.perf', 'node.async_hooks'];

@@ -160,3 +171,3 @@ * const tracing = trace_events.createTracing({ categories });

* ```js
* const trace_events = require('trace_events');
* const trace_events = require('node:trace_events');
* const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] });

@@ -163,0 +174,0 @@ * const t2 = trace_events.createTracing({ categories: ['node.perf'] });

/**
* The `assert` module provides a set of assertion functions for verifying
* The `node:assert` module provides a set of assertion functions for verifying
* invariants.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/assert.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/assert.js)
*/

@@ -15,4 +15,3 @@ declare module 'assert' {

/**
* Indicates the failure of an assertion. All errors thrown by the `assert` module
* will be instances of the `AssertionError` class.
* Indicates the failure of an assertion. All errors thrown by the `node:assert`module will be instances of the `AssertionError` class.
*/

@@ -51,3 +50,3 @@ class AssertionError extends Error {

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*

@@ -83,8 +82,7 @@ * // Creates call tracker.

* assert.deepStrictEqual(tracker.getCalls(callsfunc),
* [{ thisArg: this, arguments: [1, 2, 3 ] }]);
* [{ thisArg: undefined, arguments: [1, 2, 3] }]);
* ```
*
* @since v18.8.0, v16.18.0
* @params fn
* @returns An Array with the calls to a tracked function.
* @param fn
* @return An Array with the calls to a tracked function.
*/

@@ -97,3 +95,3 @@ getCalls(fn: Function): CallTrackerCall[];

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*

@@ -105,4 +103,2 @@ * // Creates call tracker.

*
* function foo() {}
*
* // Returns a function that wraps func() that must be called exact times

@@ -113,3 +109,3 @@ * // before tracker.verify().

* // Returns an array containing information on callsfunc()
* tracker.report();
* console.log(tracker.report());
* // [

@@ -127,3 +123,3 @@ * // {

* @since v14.2.0, v12.19.0
* @return of objects containing information about the wrapper functions returned by `calls`.
* @return An Array of objects containing information about the wrapper functions returned by `calls`.
*/

@@ -146,8 +142,7 @@ report(): CallTrackerReportInformation[];

* // Tracker was called once
* tracker.getCalls(callsfunc).length === 1;
* assert.strictEqual(tracker.getCalls(callsfunc).length, 1);
*
* tracker.reset(callsfunc);
* tracker.getCalls(callsfunc).length === 0;
* assert.strictEqual(tracker.getCalls(callsfunc).length, 0);
* ```
*
* @since v18.8.0, v16.18.0

@@ -162,3 +157,3 @@ * @param fn a tracked function to reset.

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*

@@ -205,3 +200,3 @@ * // Creates call tracker.

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -244,3 +239,3 @@ * assert.fail();

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -280,3 +275,3 @@ * assert.ok(true);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -306,3 +301,3 @@ * // Using `assert()` works the same:

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*

@@ -340,3 +335,3 @@ * assert.equal(1, 1);

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*

@@ -388,20 +383,20 @@ * assert.notEqual(1, 2);

* ```js
* import assert from 'assert';
* import assert from 'node:assert';
*
* const obj1 = {
* a: {
* b: 1
* }
* b: 1,
* },
* };
* const obj2 = {
* a: {
* b: 2
* }
* b: 2,
* },
* };
* const obj3 = {
* a: {
* b: 1
* }
* b: 1,
* },
* };
* const obj4 = Object.create(obj1);
* const obj4 = { __proto__: obj1 };
*

@@ -432,3 +427,3 @@ * assert.notDeepEqual(obj1, obj1);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -471,3 +466,3 @@ * assert.strictEqual(1, 2);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -503,3 +498,3 @@ * assert.notStrictEqual(1, 2);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -535,3 +530,3 @@ * assert.notDeepStrictEqual({ a: 1 }, { a: '1' });

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -543,3 +538,3 @@ * const err = new TypeError('Wrong value');

* nested: true,
* baz: 'text'
* baz: 'text',
* };

@@ -557,12 +552,12 @@ * err.reg = /abc/i;

* nested: true,
* baz: 'text'
* }
* baz: 'text',
* },
* // Only properties on the validation object will be tested for.
* // Using nested objects requires all properties to be present. Otherwise
* // the validation is going to fail.
* }
* },
* );
*
* // Using regular expressions to validate error properties:
* throws(
* assert.throws(
* () => {

@@ -581,3 +576,3 @@ * throw err;

* // It is not possible to use regular expressions for nested properties!
* baz: 'text'
* baz: 'text',
* },

@@ -587,8 +582,8 @@ * // The `reg` property contains a regular expression and only if the

* // to pass.
* reg: /abc/i
* }
* reg: /abc/i,
* },
* );
*
* // Fails due to the different `message` and `name` properties:
* throws(
* assert.throws(
* () => {

@@ -604,3 +599,3 @@ * const otherErr = new Error('Not found');

* // an error as validation object.
* err
* err,
* );

@@ -612,3 +607,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -619,3 +614,3 @@ * assert.throws(

* },
* Error
* Error,
* );

@@ -630,3 +625,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -637,3 +632,3 @@ * assert.throws(

* },
* /^Error: Wrong value$/
* /^Error: Wrong value$/,
* );

@@ -648,3 +643,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -665,3 +660,3 @@ * assert.throws(

* },
* 'unexpected error'
* 'unexpected error',
* );

@@ -676,3 +671,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -733,3 +728,3 @@ * function throwingFirst() {

* If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
* function. See {@link throws} for more details.

@@ -741,3 +736,3 @@ *

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -748,3 +743,3 @@ * assert.doesNotThrow(

* },
* SyntaxError
* SyntaxError,
* );

@@ -757,3 +752,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -764,3 +759,3 @@ * assert.doesNotThrow(

* },
* TypeError
* TypeError,
* );

@@ -772,3 +767,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -780,3 +775,3 @@ * assert.doesNotThrow(

* /Wrong value/,
* 'Whoops'
* 'Whoops',
* );

@@ -795,3 +790,3 @@ * // Throws: AssertionError: Got unwanted exception: Whoops

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -842,3 +837,3 @@ * assert.ifError(null);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -851,4 +846,4 @@ * await assert.rejects(

* name: 'TypeError',
* message: 'Wrong value'
* }
* message: 'Wrong value',
* },
* );

@@ -858,3 +853,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -869,3 +864,3 @@ * await assert.rejects(

* return true;
* }
* },
* );

@@ -875,7 +870,7 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*
* assert.rejects(
* Promise.reject(new Error('Wrong value')),
* Error
* Error,
* ).then(() => {

@@ -910,3 +905,3 @@ * // ...

* If specified, `error` can be a [`Class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes),
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) or a validation
* [`RegExp`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions), or a validation
* function. See {@link throws} for more details.

@@ -917,3 +912,3 @@ *

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -924,3 +919,3 @@ * await assert.doesNotReject(

* },
* SyntaxError
* SyntaxError,
* );

@@ -930,3 +925,3 @@ * ```

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -946,3 +941,3 @@ * assert.doesNotReject(Promise.reject(new TypeError('Wrong value')))

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -970,3 +965,3 @@ * assert.match('I will fail', /pass/);

* ```js
* import assert from 'assert/strict';
* import assert from 'node:assert/strict';
*

@@ -973,0 +968,0 @@ * assert.doesNotMatch('I will fail', /fail/);

/**
* The `async_hooks` module provides an API to track asynchronous resources. It
* can be accessed using:
* We strongly discourage the use of the `async_hooks` API.
* Other APIs that can cover most of its use cases include:
*
* * `AsyncLocalStorage` tracks async context
* * `process.getActiveResourcesInfo()` tracks active resources
*
* The `node:async_hooks` module provides an API to track asynchronous resources.
* It can be accessed using:
*
* ```js
* import async_hooks from 'async_hooks';
* import async_hooks from 'node:async_hooks';
* ```
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/async_hooks.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/async_hooks.js)
*/

@@ -14,3 +20,4 @@ declare module 'async_hooks' {

* ```js
* import { executionAsyncId } from 'async_hooks';
* import { executionAsyncId } from 'node:async_hooks';
* import fs from 'node:fs';
*

@@ -55,4 +62,4 @@ * console.log(executionAsyncId()); // 1 - bootstrap

* ```js
* import { open } from 'fs';
* import { executionAsyncId, executionAsyncResource } from 'async_hooks';
* import { open } from 'node:fs';
* import { executionAsyncId, executionAsyncResource } from 'node:async_hooks';
*

@@ -69,7 +76,7 @@ * console.log(executionAsyncId(), executionAsyncResource()); // 1 {}

* ```js
* import { createServer } from 'http';
* import { createServer } from 'node:http';
* import {
* executionAsyncId,
* executionAsyncResource,
* createHook
* createHook,
* } from 'async_hooks';

@@ -84,3 +91,3 @@ * const sym = Symbol('state'); // Private symbol to avoid pollution

* }
* }
* },
* }).enable();

@@ -174,7 +181,7 @@ *

* ```js
* import { createHook } from 'async_hooks';
* import { createHook } from 'node:async_hooks';
*
* const asyncHook = createHook({
* init(asyncId, type, triggerAsyncId, resource) { },
* destroy(asyncId) { }
* destroy(asyncId) { },
* });

@@ -231,3 +238,3 @@ * ```

* ```js
* import { AsyncResource, executionAsyncId } from 'async_hooks';
* import { AsyncResource, executionAsyncId } from 'node:async_hooks';
*

@@ -238,3 +245,3 @@ * // AsyncResource() is meant to be extended. Instantiating a

* const asyncResource = new AsyncResource(
* type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false }
* type, { triggerAsyncId: executionAsyncId(), requireManualDestroy: false },
* );

@@ -273,5 +280,2 @@ *

* Binds the given function to the current execution context.
*
* The returned function will have an `asyncResource` property referencing
* the `AsyncResource` to which the function is bound.
* @since v14.8.0, v12.19.0

@@ -290,5 +294,2 @@ * @param fn The function to bind to the current execution context.

* Binds the given function to execute to this `AsyncResource`'s scope.
*
* The returned function will have an `asyncResource` property referencing
* the `AsyncResource` to which the function is bound.
* @since v14.8.0, v12.19.0

@@ -334,5 +335,5 @@ * @param fn The function to bind to the current `AsyncResource`.

*
* While you can create your own implementation on top of the `async_hooks` module,`AsyncLocalStorage` should be preferred as it is a performant and memory safe
* implementation that involves significant optimizations that are non-obvious to
* implement.
* While you can create your own implementation on top of the `node:async_hooks`module, `AsyncLocalStorage` should be preferred as it is a performant and memory
* safe implementation that involves significant optimizations that are non-obvious
* to implement.
*

@@ -344,4 +345,4 @@ * The following example uses `AsyncLocalStorage` to build a simple logger

* ```js
* import http from 'http';
* import { AsyncLocalStorage } from 'async_hooks';
* import http from 'node:http';
* import { AsyncLocalStorage } from 'node:async_hooks';
*

@@ -384,13 +385,40 @@ * const asyncLocalStorage = new AsyncLocalStorage();

* Binds the given function to the current execution context.
* @since v18.16.0
* @since v19.8.0
* @experimental
* @param fn The function to bind to the current execution context.
* @returns A new function that calls `fn` within the captured execution context.
* @return A new function that calls `fn` within the captured execution context.
*/
static bind<Func extends (...args: any[]) => any>(fn: Func): Func & {
static bind<Func extends (...args: any[]) => any>(
fn: Func
): Func & {
asyncResource: AsyncResource;
};
/**
* Captures the current execution context and returns a function that accepts a function as an argument.
* Whenever the returned function is called, it calls the function passed to it within the captured context.
* @since v18.16.0
* Captures the current execution context and returns a function that accepts a
* function as an argument. Whenever the returned function is called, it
* calls the function passed to it within the captured context.
*
* ```js
* const asyncLocalStorage = new AsyncLocalStorage();
* const runInAsyncScope = asyncLocalStorage.run(123, () => AsyncLocalStorage.snapshot());
* const result = asyncLocalStorage.run(321, () => runInAsyncScope(() => asyncLocalStorage.getStore()));
* console.log(result); // returns 123
* ```
*
* AsyncLocalStorage.snapshot() can replace the use of AsyncResource for simple
* async context tracking purposes, for example:
*
* ```js
* class Foo {
* #runInAsyncScope = AsyncLocalStorage.snapshot();
*
* get() { return this.#runInAsyncScope(() => asyncLocalStorage.getStore()); }
* }
*
* const foo = asyncLocalStorage.run(123, () => new Foo());
* console.log(asyncLocalStorage.run(321, () => foo.get())); // returns 123
* ```
* @since v19.8.0
* @experimental
* @return A new function with the signature `(fn: (...args) : R, ...args) : R`.
*/

@@ -397,0 +425,0 @@ static snapshot(): (<R, TArgs extends any[]>(fn: (...args: TArgs) => R, ...args: TArgs) => R) & {

@@ -11,8 +11,8 @@ /**

* ```js
* import cluster from 'cluster';
* import http from 'http';
* import { cpus } from 'os';
* import process from 'process';
* import cluster from 'node:cluster';
* import http from 'node:http';
* import { availableParallelism } from 'node:os';
* import process from 'node:process';
*
* const numCPUs = cpus().length;
* const numCPUs = availableParallelism();
*

@@ -54,3 +54,3 @@ * if (cluster.isPrimary) {

* 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/v18.0.0/lib/cluster.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/cluster.js)
*/

@@ -188,3 +188,3 @@ declare module 'cluster' {

* } else if (cluster.isWorker) {
* const net = require('net');
* const net = require('node:net');
* const server = net.createServer((socket) => {

@@ -219,8 +219,8 @@ * // Connections never end

* ```js
* import cluster from 'cluster';
* import http from 'http';
* import { cpus } from 'os';
* import process from 'process';
* import cluster from 'node:cluster';
* import http from 'node:http';
* import { availableParallelism } from 'node:os';
* import process from 'node:process';
*
* const numCPUs = cpus().length;
* const numCPUs = availableParallelism();
*

@@ -227,0 +227,0 @@ * if (cluster.isPrimary) {

/**
* The `console` module provides a simple debugging console that is similar to the
* JavaScript console mechanism provided by web browsers.
* The `node:console` module provides a simple debugging console that is similar to
* the JavaScript console mechanism provided by web browsers.
*
* The module exports two specific components:
*
* * A `Console` class with methods such as `console.log()`, `console.error()` and`console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('console')`.
* * A `Console` class with methods such as `console.log()`, `console.error()`, and`console.warn()` that can be used to write to any Node.js stream.
* * A global `console` instance configured to write to `process.stdout` and `process.stderr`. The global `console` can be used without calling`require('node:console')`.
*

@@ -56,3 +56,3 @@ * _**Warning**_: The global console object's methods are neither consistently

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/console.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/console.js)
*/

@@ -59,0 +59,0 @@ declare module 'console' {

/**
* The `dgram` module provides an implementation of UDP datagram sockets.
* The `node:dgram` module provides an implementation of UDP datagram sockets.
*
* ```js
* import dgram from 'dgram';
* import dgram from 'node:dgram';
*

@@ -10,3 +10,3 @@ * const server = dgram.createSocket('udp4');

* server.on('error', (err) => {
* console.log(`server error:\n${err.stack}`);
* console.error(`server error:\n${err.stack}`);
* server.close();

@@ -27,3 +27,3 @@ * });

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dgram.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/dgram.js)
*/

@@ -103,4 +103,4 @@ declare module 'dgram' {

* ```js
* import cluster from 'cluster';
* import dgram from 'dgram';
* import cluster from 'node:cluster';
* import dgram from 'node:dgram';
*

@@ -122,3 +122,3 @@ * if (cluster.isPrimary) {

* Returns an object containing the address information for a socket.
* For UDP sockets, this object will contain `address`, `family` and `port`properties.
* For UDP sockets, this object will contain `address`, `family`, and `port`properties.
*

@@ -149,3 +149,3 @@ * This method throws `EBADF` if called on an unbound socket.

* ```js
* import dgram from 'dgram';
* import dgram from 'node:dgram';
*

@@ -155,3 +155,3 @@ * const server = dgram.createSocket('udp4');

* server.on('error', (err) => {
* console.log(`server error:\n${err.stack}`);
* console.error(`server error:\n${err.stack}`);
* server.close();

@@ -293,4 +293,4 @@ * });

* ```js
* import dgram from 'dgram';
* import { Buffer } from 'buffer';
* import dgram from 'node:dgram';
* import { Buffer } from 'node:buffer';
*

@@ -307,4 +307,4 @@ * const message = Buffer.from('Some bytes');

* ```js
* import dgram from 'dgram';
* import { Buffer } from 'buffer';
* import dgram from 'node:dgram';
* import { Buffer } from 'node:buffer';
*

@@ -327,4 +327,4 @@ * const buf1 = Buffer.from('Some ');

* ```js
* import dgram from 'dgram';
* import { Buffer } from 'buffer';
* import dgram from 'node:dgram';
* import { Buffer } from 'node:buffer';
*

@@ -331,0 +331,0 @@ * const message = Buffer.from('Some bytes');

/**
* The `diagnostics_channel` module provides an API to create named channels
* The `node:diagnostics_channel` module provides an API to create named channels
* to report arbitrary message data for diagnostics purposes.

@@ -8,3 +8,3 @@ *

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
* ```

@@ -23,4 +23,4 @@ *

* other modules.
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v18.7.0/lib/diagnostics_channel.js)
* @since v15.1.0, v14.17.0
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/diagnostics_channel.js)
*/

@@ -36,3 +36,3 @@ declare module 'diagnostics_channel' {

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -49,3 +49,3 @@ * if (diagnostics_channel.hasSubscribers('my-channel')) {

/**
* This is the primary entry-point for anyone wanting to interact with a named
* This is the primary entry-point for anyone wanting to publish to a named
* channel. It produces a channel object which is optimized to reduce overhead at

@@ -55,3 +55,3 @@ * publish time as much as possible.

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -67,8 +67,8 @@ * const channel = diagnostics_channel.channel('my-channel');

/**
* Register a message handler to subscribe to this channel. This message handler will be run synchronously
* whenever a message is published to the channel. Any errors thrown in the message handler will
* trigger an 'uncaughtException'.
* Register a message handler to subscribe to this channel. This message handler
* will be run synchronously whenever a message is published to the channel. Any
* errors thrown in the message handler will trigger an `'uncaughtException'`.
*
* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -79,3 +79,2 @@ * diagnostics_channel.subscribe('my-channel', (message, name) => {

* ```
*
* @since v18.7.0, v16.17.0

@@ -87,9 +86,9 @@ * @param name The channel name

/**
* Remove a message handler previously registered to this channel with diagnostics_channel.subscribe(name, onMessage).
* Remove a message handler previously registered to this channel with {@link subscribe}.
*
* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*
* function onMessage(message, name) {
* // Received data
* // Received data
* }

@@ -101,7 +100,6 @@ *

* ```
*
* @since v18.7.0, v16.17.0
* @param name The channel name
* @param onMessage The previous subscribed handler to remove
* @returns `true` if the handler was found, `false` otherwise
* @return `true` if the handler was found, `false` otherwise.
*/

@@ -111,3 +109,3 @@ function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean;

* The class `Channel` represents an individual named channel within the data
* pipeline. It is use to track subscribers and to publish messages when there
* pipeline. It is used to track subscribers and to publish messages when there
* are subscribers present. It exists as a separate object to avoid channel

@@ -129,3 +127,3 @@ * lookups at publish time, enabling very fast publish speeds and allowing

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -143,8 +141,7 @@ * const channel = diagnostics_channel.channel('my-channel');

/**
* Publish a message to any subscribers to the channel. This will
* trigger message handlers synchronously so they will execute within
* the same context.
* Publish a message to any subscribers to the channel. This will trigger
* message handlers synchronously so they will execute within the same context.
*
* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -154,3 +151,3 @@ * const channel = diagnostics_channel.channel('my-channel');

* channel.publish({
* some: 'message'
* some: 'message',
* });

@@ -168,3 +165,3 @@ * ```

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -178,2 +175,3 @@ * const channel = diagnostics_channel.channel('my-channel');

* @since v15.1.0, v14.17.0
* @deprecated Since v18.7.0,v16.17.0 - Use {@link subscribe(name, onMessage)}
* @param onMessage The handler to receive channel messages

@@ -186,3 +184,3 @@ */

* ```js
* import diagnostics_channel from 'diagnostics_channel';
* import diagnostics_channel from 'node:diagnostics_channel';
*

@@ -200,2 +198,3 @@ * const channel = diagnostics_channel.channel('my-channel');

* @since v15.1.0, v14.17.0
* @deprecated Since v18.7.0,v16.17.0 - Use {@link unsubscribe(name, onMessage)}
* @param onMessage The previous subscribed handler to remove

@@ -202,0 +201,0 @@ * @return `true` if the handler was found, `false` otherwise.

/**
* The `dns` module enables name resolution. For example, use it to look up IP
* The `node:dns` module enables name resolution. For example, use it to look up IP
* addresses of host names.

@@ -12,3 +12,3 @@ *

* ```js
* const dns = require('dns');
* const dns = require('node:dns');
*

@@ -21,3 +21,3 @@ * dns.lookup('example.org', (err, address, family) => {

*
* All other functions in the `dns` module connect to an actual DNS server to
* All other functions in the `node:dns` module connect to an actual DNS server to
* perform name resolution. They will always use the network to perform DNS

@@ -28,3 +28,3 @@ * queries. These functions do not use the same set of configuration files used by {@link lookup} (e.g. `/etc/hosts`). Use these functions to always perform

* ```js
* const dns = require('dns');
* const dns = require('node:dns');
*

@@ -48,3 +48,3 @@ * dns.resolve4('archive.org', (err, addresses) => {

* See the `Implementation considerations section` for more information.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/dns.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/dns.js)
*/

@@ -83,4 +83,4 @@ declare module 'dns' {

* AAAA (IPv6) record. All `option` properties are optional. If `options` is an
* integer, then it must be `4` or `6` – if `options` is not provided, then IPv4
* and IPv6 addresses are both returned if found.
* integer, then it must be `4` or `6` – if `options` is `0` or not provided, then
* IPv4 and IPv6 addresses are both returned if found.
*

@@ -97,3 +97,3 @@ * With the `all` option set to `true`, the arguments for `callback` change to`(err, addresses)`, with `addresses` being an array of objects with the

* The implementation uses an operating system facility that can associate names
* with addresses, and vice versa. This implementation can have subtle but
* with addresses and vice versa. This implementation can have subtle but
* important consequences on the behavior of any Node.js program. Please take some

@@ -105,3 +105,3 @@ * time to consult the `Implementation considerations section` before using`dns.lookup()`.

* ```js
* const dns = require('dns');
* const dns = require('node:dns');
* const options = {

@@ -145,3 +145,3 @@ * family: 6,

* ```js
* const dns = require('dns');
* const dns = require('node:dns');
* dns.lookupService('127.0.0.1', 22, (err, hostname, service) => {

@@ -302,3 +302,3 @@ * console.log(hostname, service);

/**
* Uses the DNS protocol to resolve a IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
* Uses the DNS protocol to resolve IPv6 addresses (`AAAA` records) for the`hostname`. The `addresses` argument passed to the `callback` function
* will contain an array of IPv6 addresses.

@@ -345,3 +345,3 @@ * @since v0.1.16

/**
* Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. The `addresses` argument passed to the `callback`function will contain an array of
* objects with the following properties:

@@ -548,3 +548,3 @@ *

*
* The default is `ipv4first` and {@link setDefaultResultOrder} have higher
* The default is `verbatim` and {@link setDefaultResultOrder} have higher
* priority than `--dns-result-order`. When using `worker threads`,{@link setDefaultResultOrder} from the main thread won't affect the default

@@ -596,3 +596,3 @@ * dns orders in workers.

* ```js
* const { Resolver } = require('dns');
* const { Resolver } = require('node:dns');
* const resolver = new Resolver();

@@ -607,3 +607,3 @@ * resolver.setServers(['4.4.4.4']);

*
* The following methods from the `dns` module are available:
* The following methods from the `node:dns` module are available:
*

@@ -655,3 +655,3 @@ * * `resolver.getServers()`

*
* If a v4 or v6 address is not specified, it is set to the default, and the
* If a v4 or v6 address is not specified, it is set to the default and the
* operating system will choose a local address automatically.

@@ -658,0 +658,0 @@ *

/**
* The `dns.promises` API provides an alternative set of asynchronous DNS methods
* that return `Promise` objects rather than using callbacks. The API is accessible
* via `require('dns').promises` or `require('dns/promises')`.
* via `require('node:dns').promises` or `require('node:dns/promises')`.
* @since v10.6.0

@@ -55,3 +55,3 @@ */

* protocol. The implementation uses an operating system facility that can
* associate names with addresses, and vice versa. This implementation can have
* associate names with addresses and vice versa. This implementation can have
* subtle but important consequences on the behavior of any Node.js program. Please

@@ -64,3 +64,3 @@ * take some time to consult the `Implementation considerations section` before

* ```js
* const dns = require('dns');
* const dns = require('node:dns');
* const dnsPromises = dns.promises;

@@ -101,3 +101,3 @@ * const options = {

* ```js
* const dnsPromises = require('dns').promises;
* const dnsPromises = require('node:dns').promises;
* dnsPromises.lookupService('127.0.0.1', 22).then((result) => {

@@ -212,3 +212,3 @@ * console.log(result.hostname, result.service);

/**
* Uses the DNS protocol to resolve regular expression based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array
* Uses the DNS protocol to resolve regular expression-based records (`NAPTR`records) for the `hostname`. On success, the `Promise` is resolved with an array
* of objects with the following properties:

@@ -344,3 +344,3 @@ *

*
* The default is `ipv4first` and `dnsPromises.setDefaultResultOrder()` have
* The default is `verbatim` and `dnsPromises.setDefaultResultOrder()` have
* higher priority than `--dns-result-order`. When using `worker threads`,`dnsPromises.setDefaultResultOrder()` from the main thread won't affect the

@@ -347,0 +347,0 @@ * default dns orders in workers.

@@ -15,3 +15,3 @@ /**

* @deprecated Since v1.4.2 - Deprecated
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/domain.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/domain.js)
*/

@@ -67,4 +67,4 @@ declare module 'domain' {

* ```js
* const domain = require('domain');
* const fs = require('fs');
* const domain = require('node:domain');
* const fs = require('node:fs');
* const d = domain.create();

@@ -71,0 +71,0 @@ * d.on('error', (er) => {

@@ -25,3 +25,3 @@ /**

* ```js
* const EventEmitter = require('events');
* import { EventEmitter } from 'node:events';
*

@@ -36,3 +36,3 @@ * class MyEmitter extends EventEmitter {}

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/events.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/events.js)
*/

@@ -43,3 +43,2 @@ declare module 'events' {

// actually starts exporting the class, uncomment below.
// import { EventListener, EventListenerObject } from '__dom-events';

@@ -75,3 +74,2 @@ // /** The NodeEventTarget is a Node.js-specific extension to EventTarget that emulates a subset of the EventEmitter API. */

// }
interface EventEmitterOptions {

@@ -102,6 +100,6 @@ /**

/**
* The `EventEmitter` class is defined and exposed by the `events` module:
* The `EventEmitter` class is defined and exposed by the `node:events` module:
*
* ```js
* const EventEmitter = require('events');
* import { EventEmitter } from 'node:events';
* ```

@@ -127,27 +125,24 @@ *

* ```js
* const { once, EventEmitter } = require('events');
* import { once, EventEmitter } from 'node:events';
* import process from 'node:process';
*
* async function run() {
* const ee = new EventEmitter();
* const ee = new EventEmitter();
*
* process.nextTick(() => {
* ee.emit('myevent', 42);
* });
* process.nextTick(() => {
* ee.emit('myevent', 42);
* });
*
* const [value] = await once(ee, 'myevent');
* console.log(value);
* const [value] = await once(ee, 'myevent');
* console.log(value);
*
* const err = new Error('kaboom');
* process.nextTick(() => {
* ee.emit('error', err);
* });
* const err = new Error('kaboom');
* process.nextTick(() => {
* ee.emit('error', err);
* });
*
* try {
* await once(ee, 'myevent');
* } catch (err) {
* console.log('error happened', err);
* }
* try {
* await once(ee, 'myevent');
* } catch (err) {
* console.error('error happened', err);
* }
*
* run();
* ```

@@ -160,3 +155,3 @@ *

* ```js
* const { EventEmitter, once } = require('events');
* import { EventEmitter, once } from 'node:events';
*

@@ -167,3 +162,3 @@ * const ee = new EventEmitter();

* .then(([err]) => console.log('ok', err.message))
* .catch((err) => console.log('error', err.message));
* .catch((err) => console.error('error', err.message));
*

@@ -178,3 +173,3 @@ * ee.emit('error', new Error('boom'));

* ```js
* const { EventEmitter, once } = require('events');
* import { EventEmitter, once } from 'node:events';
*

@@ -207,21 +202,20 @@ * const ee = new EventEmitter();

* ```js
* const { on, EventEmitter } = require('events');
* import { on, EventEmitter } from 'node:events';
* import process from 'node:process';
*
* (async () => {
* const ee = new EventEmitter();
* const ee = new EventEmitter();
*
* // Emit later on
* process.nextTick(() => {
* ee.emit('foo', 'bar');
* ee.emit('foo', 42);
* });
* // Emit later on
* process.nextTick(() => {
* ee.emit('foo', 'bar');
* ee.emit('foo', 42);
* });
*
* for await (const event of on(ee, 'foo')) {
* // The execution of this inner block is synchronous and it
* // processes one event at a time (even with await). Do not use
* // if concurrent execution is required.
* console.log(event); // prints ['bar'] [42]
* }
* // Unreachable here
* })();
* for await (const event of on(ee, 'foo')) {
* // The execution of this inner block is synchronous and it
* // processes one event at a time (even with await). Do not use
* // if concurrent execution is required.
* console.log(event); // prints ['bar'] [42]
* }
* // Unreachable here
* ```

@@ -237,3 +231,5 @@ *

* ```js
* const { on, EventEmitter } = require('events');
* import { on, EventEmitter } from 'node:events';
* import process from 'node:process';
*
* const ac = new AbortController();

@@ -270,3 +266,4 @@ *

* ```js
* const { EventEmitter, listenerCount } = require('events');
* import { EventEmitter, listenerCount } from 'node:events';
*
* const myEmitter = new EventEmitter();

@@ -294,3 +291,3 @@ * myEmitter.on('event', () => {});

* ```js
* const { getEventListeners, EventEmitter } = require('events');
* import { getEventListeners, EventEmitter } from 'node:events';
*

@@ -301,3 +298,3 @@ * {

* ee.on('foo', listener);
* getEventListeners(ee, 'foo'); // [listener]
* console.log(getEventListeners(ee, 'foo')); // [ [Function: listener] ]
* }

@@ -308,3 +305,3 @@ * {

* et.addEventListener('foo', listener);
* getEventListeners(et, 'foo'); // [listener]
* console.log(getEventListeners(et, 'foo')); // [ [Function: listener] ]
* }

@@ -317,6 +314,3 @@ * ```

* ```js
* const {
* setMaxListeners,
* EventEmitter
* } = require('events');
* import { setMaxListeners, EventEmitter } from 'node:events';
*

@@ -389,2 +383,3 @@ * const target = new EventTarget();

* ```js
* import { EventEmitter } from 'node:events';
* const myEE = new EventEmitter();

@@ -419,2 +414,3 @@ * myEE.on('foo', () => console.log('a'));

* ```js
* import { EventEmitter } from 'node:events';
* const myEE = new EventEmitter();

@@ -455,2 +451,4 @@ * myEE.once('foo', () => console.log('a'));

* ```js
* import { EventEmitter } from 'node:events';
* class MyEmitter extends EventEmitter {}
* const myEmitter = new MyEmitter();

@@ -496,2 +494,3 @@ *

* ```js
* import { EventEmitter } from 'node:events';
* const ee = new EventEmitter();

@@ -565,2 +564,3 @@ *

* ```js
* import { EventEmitter } from 'node:events';
* const emitter = new EventEmitter();

@@ -598,3 +598,3 @@ * emitter.once('log', () => console.log('log once'));

* ```js
* const EventEmitter = require('events');
* import { EventEmitter } from 'node:events';
* const myEmitter = new EventEmitter();

@@ -634,6 +634,5 @@ *

/**
* Returns the number of listeners listening to the event named `eventName`.
*
* If `listener` is provided, it will return how many times the listener
* is found in the list of the listeners of the event.
* Returns the number of listeners listening for the event named `eventName`.
* If `listener` is provided, it will return how many times the listener is found
* in the list of the listeners of the event.
* @since v3.2.0

@@ -683,3 +682,4 @@ * @param eventName The name of the event being listened for

* ```js
* const EventEmitter = require('events');
* import { EventEmitter } from 'node:events';
*
* const myEE = new EventEmitter();

@@ -686,0 +686,0 @@ * myEE.on('foo', () => {});

@@ -41,3 +41,2 @@ /**

import { Interface as ReadlineInterface } from 'node:readline';
interface FileChangeInfo<T extends string | Buffer> {

@@ -116,4 +115,4 @@ eventType: WatchEventType;

/**
* Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream
* returned by this method has a default `highWaterMark` of 64 kb.
* Unlike the 16 KiB default `highWaterMark` for a `stream.Readable`, the stream
* returned by this method has a default `highWaterMark` of 64 KiB.
*

@@ -136,3 +135,3 @@ * `options` can include `start` and `end` values to read a range of bytes from

* ```js
* import { open } from 'fs/promises';
* import { open } from 'node:fs/promises';
*

@@ -163,3 +162,3 @@ * const fd = await open('/dev/input/event0');

* ```js
* import { open } from 'fs/promises';
* import { open } from 'node:fs/promises';
*

@@ -203,3 +202,3 @@ * const fd = await open('sample.txt');

* @since v10.0.0
* @return Fufills with `undefined` upon success.
* @return Fulfills with `undefined` upon success.
*/

@@ -225,7 +224,9 @@ sync(): Promise<void>;

*
* An error will be thrown if this method is called more than once or is called after the `FileHandle` is closed
* or closing.
* An error will be thrown if this method is called more than once or is called
* after the `FileHandle` is closed or closing.
*
* ```js
* import { open } from 'node:fs/promises';
* import {
* open,
* } from 'node:fs/promises';
*

@@ -240,4 +241,4 @@ * const file = await open('./some/file/to/read');

*
* While the `ReadableStream` will read the file to completion, it will not close the `FileHandle` automatically. User code must still call the `fileHandle.close()` method.
*
* While the `ReadableStream` will read the file to completion, it will not
* close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method.
* @since v17.0.0

@@ -296,3 +297,4 @@ * @experimental

/**
* Convenience method to create a `readline` interface and stream over the file. For example:
* Convenience method to create a `readline` interface and stream over the file.
* See `filehandle.createReadStream()` for the options.
*

@@ -308,5 +310,3 @@ * ```js

* ```
*
* @since v18.11.0
* @param options See `filehandle.createReadStream()` for the options.
*/

@@ -338,3 +338,3 @@ readLines(options?: CreateReadStreamOptions): ReadlineInterface;

* ```js
* import { open } from 'fs/promises';
* import { open } from 'node:fs/promises';
*

@@ -366,3 +366,3 @@ * let filehandle = null;

* Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
* [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
* [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
* [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.

@@ -397,6 +397,6 @@ * The promise is resolved with no arguments upon success.

* @since v10.0.0
* @param [offset=0] The start position from within `buffer` where the data to write begins.
* @param offset The start position from within `buffer` where the data to write begins.
* @param [length=buffer.byteLength - offset] The number of bytes from `buffer` to write.
* @param position The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current position.
* See the POSIX pwrite(2) documentation for more detail.
* @param [position='null'] The offset from the beginning of the file where the data from `buffer` should be written. If `position` is not a `number`, the data will be written at the current
* position. See the POSIX pwrite(2) documentation for more detail.
*/

@@ -432,3 +432,3 @@ write<TBuffer extends Uint8Array>(

* @since v12.9.0
* @param position The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current
* @param [position='null'] The offset from the beginning of the file where the data from `buffers` should be written. If `position` is not a `number`, the data will be written at the current
* position.

@@ -440,3 +440,3 @@ */

* @since v13.13.0, v12.17.0
* @param position The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
* @param [position='null'] The offset from the beginning of the file where the data should be read from. If `position` is not a `number`, the data will be read from the current position.
* @return Fulfills upon success an object containing two properties:

@@ -450,3 +450,3 @@ */

* ```js
* import { open } from 'fs/promises';
* import { open } from 'node:fs/promises';
*

@@ -465,5 +465,3 @@ * let filehandle;

}
const constants: typeof fsConstants;
/**

@@ -482,4 +480,3 @@ * Tests a user's permissions for the file or directory specified by `path`.

* ```js
* import { access } from 'fs/promises';
* import { constants } from 'fs';
* import { access, constants } from 'node:fs/promises';
*

@@ -513,4 +510,3 @@ * try {

* ```js
* import { constants } from 'fs';
* import { copyFile } from 'fs/promises';
* import { copyFile, constants } from 'node:fs/promises';
*

@@ -521,3 +517,3 @@ * try {

* } catch {
* console.log('The file could not be copied');
* console.error('The file could not be copied');
* }

@@ -530,3 +526,3 @@ *

* } catch {
* console.log('The file could not be copied');
* console.error('The file could not be copied');
* }

@@ -593,2 +589,15 @@ * ```

* rejection only when `recursive` is false.
*
* ```js
* import { mkdir } from 'node:fs/promises';
*
* try {
* const projectFolder = new URL('./test/project/', import.meta.url);
* const createDir = await mkdir(projectFolder, { recursive: true });
*
* console.log(`created ${createDir}`);
* } catch (err) {
* console.error(err.message);
* }
* ```
* @since v10.0.0

@@ -636,3 +645,3 @@ * @return Upon success, fulfills with `undefined` if `recursive` is `false`, or the first directory path created if `recursive` is `true`.

* ```js
* import { readdir } from 'fs/promises';
* import { readdir } from 'node:fs/promises';
*

@@ -725,7 +734,9 @@ * try {

*
* The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. Windows junction points require the destination path
* to be absolute. When using `'junction'`, the `target` argument will
* The `type` argument is only used on Windows platforms and can be one of `'dir'`,`'file'`, or `'junction'`. If the `type` argument is not a string, Node.js will
* autodetect `target` type and use `'file'` or `'dir'`. If the `target` does not
* exist, `'file'` will be used. Windows junction points require the destination
* path to be absolute. When using `'junction'`, the `target` argument will
* automatically be normalized to absolute path.
* @since v10.0.0
* @param [type='file']
* @param [type='null']
* @return Fulfills with `undefined` upon success.

@@ -826,3 +837,3 @@ */

* numeric string like `'123456789.0'`.
* * If the value can not be converted to a number, or is `NaN`, `Infinity` or`-Infinity`, an `Error` will be thrown.
* * If the value can not be converted to a number, or is `NaN`, `Infinity`, or`-Infinity`, an `Error` will be thrown.
* @since v10.0.0

@@ -872,6 +883,8 @@ * @return Fulfills with `undefined` upon success.

* ```js
* import { mkdtemp } from 'fs/promises';
* import { mkdtemp } from 'node:fs/promises';
* import { join } from 'node:path';
* import { tmpdir } from 'node:os';
*
* try {
* await mkdtemp(path.join(os.tmpdir(), 'foo-'));
* await mkdtemp(join(tmpdir(), 'foo-'));
* } catch (err) {

@@ -885,5 +898,5 @@ * console.error(err);

* platform-specific path separator
* (`require('path').sep`).
* (`require('node:path').sep`).
* @since v10.0.0
* @return Fulfills with a string containing the filesystem path of the newly created temporary directory.
* @return Fulfills with a string containing the file system path of the newly created temporary directory.
*/

@@ -905,3 +918,3 @@ function mkdtemp(prefix: string, options?: ObjectEncodingOptions | BufferEncoding | null): Promise<string>;

* Asynchronously writes data to a file, replacing the file if it already exists.`data` can be a string, a buffer, an
* [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface) or
* [AsyncIterable](https://tc39.github.io/ecma262/#sec-asynciterable-interface), or an
* [Iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) object.

@@ -929,4 +942,4 @@ *

* ```js
* import { writeFile } from 'fs/promises';
* import { Buffer } from 'buffer';
* import { writeFile } from 'node:fs/promises';
* import { Buffer } from 'node:buffer';
*

@@ -994,2 +1007,16 @@ * try {

*
* An example of reading a `package.json` file located in the same directory of the
* running code:
*
* ```js
* import { readFile } from 'node:fs/promises';
* try {
* const filePath = new URL('./package.json', import.meta.url);
* const contents = await readFile(filePath, { encoding: 'utf8' });
* console.log(contents);
* } catch (err) {
* console.error(err.message);
* }
* ```
*
* It is possible to abort an ongoing `readFile` using an `AbortSignal`. If a

@@ -999,3 +1026,3 @@ * request is aborted the promise returned is rejected with an `AbortError`:

* ```js
* import { readFile } from 'fs/promises';
* import { readFile } from 'node:fs/promises';
*

@@ -1079,3 +1106,3 @@ * try {

* ```js
* import { opendir } from 'fs/promises';
* import { opendir } from 'node:fs/promises';
*

@@ -1101,3 +1128,3 @@ * try {

* ```js
* const { watch } = require('fs/promises');
* const { watch } = require('node:fs/promises');
*

@@ -1104,0 +1131,0 @@ * const ac = new AbortController();

/**
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
* separate module.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/https.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/https.js)
*/

@@ -62,18 +62,5 @@ declare module 'https' {

addListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
addListener(
event: 'newSession',
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
addListener(
event: 'OCSPRequest',
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
addListener(
event: 'resumeSession',
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
addListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
addListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
addListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
addListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;

@@ -88,25 +75,9 @@ addListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;

addListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
addListener(
event: 'connect',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
addListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
addListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
addListener(
event: 'upgrade',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
addListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
emit(event: string, ...args: any[]): boolean;
emit(event: 'keylog', line: Buffer, tlsSocket: tls.TLSSocket): boolean;
emit(
event: 'newSession',
sessionId: Buffer,
sessionData: Buffer,
callback: (err: Error, resp: Buffer) => void,
): boolean;
emit(
event: 'OCSPRequest',
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
): boolean;
emit(event: 'newSession', sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void): boolean;
emit(event: 'OCSPRequest', certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void): boolean;
emit(event: 'resumeSession', sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void): boolean;

@@ -122,3 +93,5 @@ emit(event: 'secureConnection', tlsSocket: tls.TLSSocket): boolean;

req: InstanceType<Request>,
res: InstanceType<Response> & { req: InstanceType<Request> },
res: InstanceType<Response> & {
req: InstanceType<Request>;
}
): boolean;

@@ -128,3 +101,5 @@ emit(

req: InstanceType<Request>,
res: InstanceType<Response> & { req: InstanceType<Request> },
res: InstanceType<Response> & {
req: InstanceType<Request>;
}
): boolean;

@@ -136,3 +111,5 @@ emit(event: 'clientError', err: Error, socket: Duplex): boolean;

req: InstanceType<Request>,
res: InstanceType<Response> & { req: InstanceType<Request> },
res: InstanceType<Response> & {
req: InstanceType<Request>;
}
): boolean;

@@ -142,18 +119,5 @@ emit(event: 'upgrade', req: InstanceType<Request>, socket: Duplex, head: Buffer): boolean;

on(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
on(
event: 'newSession',
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
on(
event: 'OCSPRequest',
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
on(
event: 'resumeSession',
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
on(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
on(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
on(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
on(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;

@@ -173,18 +137,5 @@ on(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;

once(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
once(
event: 'newSession',
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
once(
event: 'OCSPRequest',
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
once(
event: 'resumeSession',
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
once(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
once(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
once(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
once(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;

@@ -204,18 +155,5 @@ once(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;

prependListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependListener(
event: 'newSession',
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
prependListener(
event: 'OCSPRequest',
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
prependListener(
event: 'resumeSession',
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
prependListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
prependListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
prependListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
prependListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;

@@ -230,29 +168,10 @@ prependListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;

prependListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
prependListener(
event: 'connect',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
prependListener(
event: 'upgrade',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: 'keylog', listener: (line: Buffer, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(
event: 'newSession',
listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void,
): this;
prependOnceListener(
event: 'OCSPRequest',
listener: (
certificate: Buffer,
issuer: Buffer,
callback: (err: Error | null, resp: Buffer) => void,
) => void,
): this;
prependOnceListener(
event: 'resumeSession',
listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void,
): this;
prependOnceListener(event: 'newSession', listener: (sessionId: Buffer, sessionData: Buffer, callback: (err: Error, resp: Buffer) => void) => void): this;
prependOnceListener(event: 'OCSPRequest', listener: (certificate: Buffer, issuer: Buffer, callback: (err: Error | null, resp: Buffer) => void) => void): this;
prependOnceListener(event: 'resumeSession', listener: (sessionId: Buffer, callback: (err: Error, sessionData: Buffer) => void) => void): this;
prependOnceListener(event: 'secureConnection', listener: (tlsSocket: tls.TLSSocket) => void): this;

@@ -267,11 +186,5 @@ prependOnceListener(event: 'tlsClientError', listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;

prependOnceListener(event: 'clientError', listener: (err: Error, socket: Duplex) => void): this;
prependOnceListener(
event: 'connect',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: 'connect', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
prependOnceListener(event: 'request', listener: http.RequestListener<Request, Response>): this;
prependOnceListener(
event: 'upgrade',
listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void,
): this;
prependOnceListener(event: 'upgrade', listener: (req: InstanceType<Request>, socket: Duplex, head: Buffer) => void): this;
}

@@ -281,8 +194,8 @@ /**

* // curl -k https://localhost:8000/
* const https = require('https');
* const fs = require('fs');
* const https = require('node:https');
* const fs = require('node:fs');
*
* const options = {
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* };

@@ -299,8 +212,8 @@ *

* ```js
* const https = require('https');
* const fs = require('fs');
* const https = require('node:https');
* const fs = require('node:fs');
*
* const options = {
* pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
* passphrase: 'sample'
* passphrase: 'sample',
* };

@@ -341,3 +254,3 @@ *

* ```js
* const https = require('https');
* const https = require('node:https');
*

@@ -348,3 +261,3 @@ * const options = {

* path: '/',
* method: 'GET'
* method: 'GET',
* };

@@ -376,3 +289,3 @@ *

* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem')
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* };

@@ -396,3 +309,3 @@ * options.agent = new https.Agent(options);

* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* agent: false
* agent: false,
* };

@@ -418,5 +331,5 @@ *

* ```js
* const tls = require('tls');
* const https = require('https');
* const crypto = require('crypto');
* const tls = require('node:tls');
* const https = require('node:https');
* const crypto = require('node:crypto');
*

@@ -438,3 +351,3 @@ * function sha256(s) {

*
* // Pin the public key, similar to HPKP pin-sha25 pinning
* // Pin the public key, similar to HPKP pin-sha256 pinning
* const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';

@@ -514,11 +427,4 @@ * if (sha256(cert.pubkey) !== pubkey256) {

*/
function request(
options: RequestOptions | string | URL,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
function request(
url: string | URL,
options: RequestOptions,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
function request(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
function request(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
/**

@@ -531,3 +437,3 @@ * Like `http.get()` but for HTTPS.

* ```js
* const https = require('https');
* const https = require('node:https');
*

@@ -549,11 +455,4 @@ * https.get('https://encrypted.google.com/', (res) => {

*/
function get(
options: RequestOptions | string | URL,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
function get(
url: string | URL,
options: RequestOptions,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
function get(options: RequestOptions | string | URL, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
function get(url: string | URL, options: RequestOptions, callback?: (res: http.IncomingMessage) => void): http.ClientRequest;
let globalAgent: Agent;

@@ -560,0 +459,0 @@ }

@@ -13,5 +13,5 @@ /**

* ```js
* const fs = require('fs');
* const assert = require('assert');
* const { syncBuiltinESMExports } = require('module');
* const fs = require('node:fs');
* const assert = require('node:assert');
* const { syncBuiltinESMExports } = require('node:module');
*

@@ -30,3 +30,3 @@ * fs.readFile = newAPI;

*
* import('fs').then((esmFS) => {
* import('node:fs').then((esmFS) => {
* // It syncs the existing readFile property with the new value

@@ -49,2 +49,3 @@ * assert.strictEqual(esmFS.readFile, newAPI);

* @since v13.7.0, v12.17.0
* @return Returns `module.SourceMap` if a source map is found, `undefined` otherwise.
*/

@@ -51,0 +52,0 @@ function findSourceMap(path: string, error?: Error): SourceMap;

/**
* > Stability: 2 - Stable
*
* The `net` module provides an asynchronous network API for creating stream-based
* The `node:net` module provides an asynchronous network API for creating stream-based
* TCP or `IPC` servers ({@link createServer}) and clients

@@ -11,5 +11,5 @@ * ({@link createConnection}).

* ```js
* const net = require('net');
* const net = require('node:net');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/net.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/net.js)
*/

@@ -145,9 +145,6 @@ declare module 'net' {

* Close the TCP connection by sending an RST packet and destroy the stream.
* If this TCP socket is in connecting status, it will send an RST packet
* and destroy this TCP socket once it is connected. Otherwise, it will call
* `socket.destroy` with an `ERR_SOCKET_CLOSED` Error. If this is not a TCP socket
* (for example, a pipe), calling this method will immediately throw
* an `ERR_INVALID_HANDLE_TYPE` Error.
* @since v18.3.0
* @return The socket itself.
* If this TCP socket is in connecting status, it will send an RST packet and destroy this TCP socket once it is connected.
* Otherwise, it will call `socket.destroy` with an `ERR_SOCKET_CLOSED` Error.
* If this is not a TCP socket (for example, a pipe), calling this method will immediately throw an `ERR_INVALID_HANDLE_TYPE` Error.
* @since v18.3.0, v16.17.0
*/

@@ -292,9 +289,9 @@ resetAndDestroy(): this;

* The string representation of the local IP family. `'IPv4'` or `'IPv6'`.
* @since v18.8.0
* @since v18.8.0, v16.18.0
*/
readonly localFamily?: string;
/**
* This is `true` if the socket is not connected yet, either because `.connect()`
* has not yet been called or because it is still in the process of connecting (see `socket.connecting`).
* @since v10.16.0
* This is `true` if the socket is not connected yet, either because `.connect()`has not yet been called or because it is still in the process of connecting
* (see `socket.connecting`).
* @since v11.2.0, v10.16.0
*/

@@ -304,3 +301,7 @@ readonly pending: boolean;

* This property represents the state of the connection as a string.
* @see {https://nodejs.org/api/net.html#socketreadystate}
*
* * If the stream is connecting `socket.readyState` is `opening`.
* * If the stream is readable and writable, it is `open`.
* * If the stream is readable and not writable, it is `readOnly`.
* * If the stream is not readable and writable, it is `writeOnly`.
* @since v0.5.0

@@ -326,3 +327,4 @@ */

/**
* The socket timeout in milliseconds as set by socket.setTimeout(). It is undefined if a timeout has not been set.
* The socket timeout in milliseconds as set by `socket.setTimeout()`.
* It is `undefined` if a timeout has not been set.
* @since v10.7.0

@@ -508,3 +510,3 @@ */

* if (e.code === 'EADDRINUSE') {
* console.log('Address in use, retrying...');
* console.error('Address in use, retrying...');
* setTimeout(() => {

@@ -731,3 +733,3 @@ * server.close();

* ```js
* const net = require('net');
* const net = require('node:net');
* const server = net.createServer((c) => {

@@ -870,2 +872,3 @@ * // 'connection' listener.

/**
* Either \`'ipv4'\` or \`'ipv6'\`.
* @since v15.14.0, v14.18.0

@@ -872,0 +875,0 @@ */

/**
* The `os` module provides operating system-related utility methods and
* The `node:os` module provides operating system-related utility methods and
* properties. It can be accessed using:
*
* ```js
* const os = require('os');
* const os = require('node:os');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/os.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/os.js)
*/

@@ -78,2 +78,3 @@ declare module 'os' {

* Returns an array of objects containing information about each logical CPU core.
* The array will be empty if no CPU information is available, such as if the`/proc` file system is unavailable.
*

@@ -92,4 +93,4 @@ * The properties included on each object include:

* idle: 1070356870,
* irq: 0
* }
* irq: 0,
* },
* },

@@ -104,4 +105,4 @@ * {

* idle: 1071569080,
* irq: 0
* }
* irq: 0,
* },
* },

@@ -116,4 +117,4 @@ * {

* idle: 1070919370,
* irq: 0
* }
* irq: 0,
* },
* },

@@ -128,4 +129,4 @@ * {

* idle: 1070905480,
* irq: 20
* }
* irq: 20,
* },
* },

@@ -137,2 +138,5 @@ * ]

* are always 0.
*
* `os.cpus().length` should not be used to calculate the amount of parallelism
* available to an application. Use {@link availableParallelism} for this purpose.
* @since v0.3.3

@@ -142,6 +146,7 @@ */

/**
* Returns an estimate of the default amount of parallelism a program should use. Always returns a value greater than zero.
* Returns an estimate of the default amount of parallelism a program should use.
* Always returns a value greater than zero.
*
* This function is a small wrapper about libuv's [`uv_available_parallelism()`](https://docs.libuv.org/en/v1.x/misc.html#c.uv_available_parallelism).
* @since 18.4.0
* @since v19.4.0, v18.14.0
*/

@@ -432,8 +437,7 @@ function availableParallelism(): number;

/**
* Returns the machine type as a string, such as arm, aarch64, mips, mips64, ppc64, ppc64le, s390, s390x, i386, i686, x86_64.
* Returns the machine type as a string, such as `arm`, `arm64`, `aarch64`,`mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`.
*
* On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname).
* On Windows, `RtlGetVersion()` is used, and if it is not available, `GetVersionExW()` will be used.
* See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
* @since v18.9.0
* On POSIX systems, the machine type is determined by calling [`uname(3)`](https://linux.die.net/man/3/uname). On Windows, `RtlGetVersion()` is used, and if it is not
* available, `GetVersionExW()` will be used. See [https://en.wikipedia.org/wiki/Uname#Examples](https://en.wikipedia.org/wiki/Uname#Examples) for more information.
* @since v18.9.0, v16.18.0
*/

@@ -440,0 +444,0 @@ function machine(): string;

@@ -10,9 +10,9 @@ declare module 'path/posix' {

/**
* The `path` module provides utilities for working with file and directory paths.
* It can be accessed using:
* The `node:path` module provides utilities for working with file and directory
* paths. It can be accessed using:
*
* ```js
* const path = require('path');
* const path = require('node:path');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/path.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/path.js)
*/

@@ -19,0 +19,0 @@ declare module 'path' {

@@ -10,5 +10,6 @@ /**

* * [User Timing](https://www.w3.org/TR/user-timing/)
* * [Resource Timing](https://www.w3.org/TR/resource-timing-2/)
*
* ```js
* const { PerformanceObserver, performance } = require('perf_hooks');
* const { PerformanceObserver, performance } = require('node:perf_hooks');
*

@@ -30,3 +31,3 @@ * const obs = new PerformanceObserver((items) => {

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/perf_hooks.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/perf_hooks.js)
*/

@@ -51,2 +52,3 @@ declare module 'perf_hooks' {

/**
* The constructor of this class is not exposed to users directly.
* @since v8.5.0

@@ -93,2 +95,6 @@ */

}
/**
* Exposes marks created via the `Performance.mark()` method.
* @since v18.2.0, v16.17.0
*/
class PerformanceMark extends PerformanceEntry {

@@ -98,2 +104,8 @@ readonly duration: 0;

}
/**
* Exposes measures created via the `Performance.measure()` method.
*
* The constructor of this class is not exposed to users directly.
* @since v18.2.0, v16.17.0
*/
class PerformanceMeasure extends PerformanceEntry {

@@ -296,4 +308,4 @@ readonly entryType: 'measure';

* performance,
* PerformanceObserver
* } = require('perf_hooks');
* PerformanceObserver,
* } = require('node:perf_hooks');
*

@@ -339,4 +351,4 @@ * const obs = new PerformanceObserver((perfObserverList, observer) => {

* performance,
* PerformanceObserver
* } = require('perf_hooks');
* PerformanceObserver,
* } = require('node:perf_hooks');
*

@@ -389,4 +401,4 @@ * const obs = new PerformanceObserver((perfObserverList, observer) => {

* performance,
* PerformanceObserver
* } = require('perf_hooks');
* PerformanceObserver,
* } = require('node:perf_hooks');
*

@@ -425,2 +437,5 @@ * const obs = new PerformanceObserver((perfObserverList, observer) => {

type PerformanceObserverCallback = (list: PerformanceObserverEntryList, observer: PerformanceObserver) => void;
/**
* @since v8.5.0
*/
class PerformanceObserver extends AsyncResource {

@@ -439,4 +454,4 @@ constructor(callback: PerformanceObserverCallback);

* performance,
* PerformanceObserver
* } = require('perf_hooks');
* PerformanceObserver,
* } = require('node:perf_hooks');
*

@@ -560,7 +575,6 @@ * const obs = new PerformanceObserver((list, observer) => {

/**
* Adds the values from other to this histogram.
* Adds the values from `other` to this histogram.
* @since v17.4.0, v16.14.0
* @param other Recordable Histogram to combine with
*/
add(other: RecordableHistogram): void;
add(other: RecordableHistogram): void;
}

@@ -580,3 +594,3 @@ /**

* ```js
* const { monitorEventLoopDelay } = require('perf_hooks');
* const { monitorEventLoopDelay } = require('node:perf_hooks');
* const h = monitorEventLoopDelay({ resolution: 20 });

@@ -619,3 +633,2 @@ * h.enable();

function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
import { performance as _performance } from 'perf_hooks';

@@ -622,0 +635,0 @@ global {

@@ -27,3 +27,3 @@ /**

* @deprecated Since v7.0.0 - Deprecated
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/punycode.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/punycode.js)
*/

@@ -30,0 +30,0 @@ declare module 'punycode' {

/**
* The `querystring` module provides utilities for parsing and formatting URL
* The `node:querystring` module provides utilities for parsing and formatting URL
* query strings. It can be accessed using:
*
* ```js
* const querystring = require('querystring');
* const querystring = require('node:querystring');
* ```
*
* `querystring` is more performant than `URLSearchParams` but is not a
* standardized API. Use `URLSearchParams` when performance is not critical
* or when compatibility with browser code is desirable.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/querystring.js)
* standardized API. Use `URLSearchParams` when performance is not critical or
* when compatibility with browser code is desirable.
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/querystring.js)
*/

@@ -14,0 +14,0 @@ declare module 'querystring' {

/**
* The `readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
* The `node:readline` module provides an interface for reading data from a `Readable` stream (such as `process.stdin`) one line at a time.
*

@@ -16,3 +16,3 @@ * To use the promise-based APIs:

*
* The following simple example illustrates the basic use of the `readline` module.
* The following simple example illustrates the basic use of the `node:readline`module.
*

@@ -34,3 +34,3 @@ * ```js

* received on the `input` stream.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/readline.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/readline.js)
*/

@@ -413,7 +413,7 @@ declare module 'readline' {

* ```js
* const readline = require('readline');
* const readline = require('node:readline');
* const rl = readline.createInterface({
* input: process.stdin,
* output: process.stdout,
* prompt: 'OHAI> '
* prompt: 'OHAI> ',
* });

@@ -446,4 +446,4 @@ *

* ```js
* const fs = require('fs');
* const readline = require('readline');
* const fs = require('node:fs');
* const readline = require('node:readline');
*

@@ -455,3 +455,3 @@ * async function processLineByLine() {

* input: fileStream,
* crlfDelay: Infinity
* crlfDelay: Infinity,
* });

@@ -473,8 +473,8 @@ * // Note: we use the crlfDelay option to recognize all instances of CR LF

* ```js
* const fs = require('fs');
* const readline = require('readline');
* const fs = require('node:fs');
* const readline = require('node:readline');
*
* const rl = readline.createInterface({
* input: fs.createReadStream('sample.txt'),
* crlfDelay: Infinity
* crlfDelay: Infinity,
* });

@@ -490,5 +490,5 @@ *

* ```js
* const { once } = require('events');
* const { createReadStream } = require('fs');
* const { createInterface } = require('readline');
* const { once } = require('node:events');
* const { createReadStream } = require('node:fs');
* const { createInterface } = require('node:readline');
*

@@ -499,3 +499,3 @@ * (async function processLineByLine() {

* input: createReadStream('big-file.txt'),
* crlfDelay: Infinity
* crlfDelay: Infinity,
* });

@@ -502,0 +502,0 @@ *

@@ -10,3 +10,2 @@ /**

import { Abortable } from 'node:events';
class Interface extends _Interface {

@@ -49,3 +48,2 @@ /**

}
class Readline {

@@ -55,3 +53,8 @@ /**

*/
constructor(stream: NodeJS.WritableStream, options?: { autoCommit?: boolean });
constructor(
stream: NodeJS.WritableStream,
options?: {
autoCommit?: boolean;
}
);
/**

@@ -86,3 +89,2 @@ * The `rl.clearLine()` method adds to the internal list of pending action an action that clears current line of the associated `stream` in a specified direction identified by `dir`.

}
/**

@@ -89,0 +91,0 @@ * The `readlinePromises.createInterface()` method creates a new `readlinePromises.Interface` instance.

/**
* The `repl` module provides a Read-Eval-Print-Loop (REPL) implementation that
* is available both as a standalone program or includible in other applications.
* It can be accessed using:
* The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation
* that is available both as a standalone program or includible in other
* applications. It can be accessed using:
*
* ```js
* const repl = require('repl');
* const repl = require('node:repl');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/repl.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/repl.js)
*/

@@ -127,3 +127,3 @@ declare module 'repl' {

* ```js
* const repl = require('repl');
* const repl = require('node:repl');
*

@@ -255,3 +255,3 @@ * const options = { useColors: true };

* ```js
* const repl = require('repl');
* const repl = require('node:repl');
*

@@ -265,3 +265,3 @@ * const replServer = repl.start({ prompt: '> ' });

* this.displayPrompt();
* }
* },
* });

@@ -407,3 +407,3 @@ * replServer.defineCommand('saybye', function saybye() {

* ```js
* const repl = require('repl');
* const repl = require('node:repl');
*

@@ -410,0 +410,0 @@ * // a Unix style prompt

declare module 'stream/consumers' {
import { Blob as NodeBlob } from "node:buffer";
import { Blob as NodeBlob } from 'node:buffer';
import { Readable } from 'node:stream';

@@ -4,0 +4,0 @@ function buffer(stream: NodeJS.ReadableStream | Readable | AsyncIterator<any>): Promise<Buffer>;

/**
* The `string_decoder` module provides an API for decoding `Buffer` objects into
* strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
* The `node:string_decoder` module provides an API for decoding `Buffer` objects
* into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16
* characters. It can be accessed using:
*
* ```js
* const { StringDecoder } = require('string_decoder');
* const { StringDecoder } = require('node:string_decoder');
* ```

@@ -13,3 +13,3 @@ *

* ```js
* const { StringDecoder } = require('string_decoder');
* const { StringDecoder } = require('node:string_decoder');
* const decoder = new StringDecoder('utf8');

@@ -33,3 +33,3 @@ *

* ```js
* const { StringDecoder } = require('string_decoder');
* const { StringDecoder } = require('node:string_decoder');
* const decoder = new StringDecoder('utf8');

@@ -41,3 +41,3 @@ *

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/string_decoder.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/string_decoder.js)
*/

@@ -44,0 +44,0 @@ declare module 'string_decoder' {

@@ -13,3 +13,2 @@ /**

function run(options?: RunOptions): TestsStream;
/**

@@ -53,3 +52,2 @@ * The `test()` function is the value imported from the test module. Each invocation of this

function test(fn?: TestFn): Promise<void>;
/**

@@ -72,3 +70,2 @@ * @since v18.6.0

function skip(fn?: SuiteFn): void;
// Shorthand for marking a suite as `TODO`, same as `describe([name], { todo: true }[, fn])`.

@@ -80,3 +77,2 @@ function todo(name?: string, options?: TestOptions, fn?: SuiteFn): void;

}
/**

@@ -100,3 +96,2 @@ * @since v18.6.0

function skip(fn?: ItFn): void;
// Shorthand for marking a test as `TODO`, same as `it([name], { todo: true }[, fn])`.

@@ -108,3 +103,2 @@ function todo(name?: string, options?: TestOptions, fn?: ItFn): void;

}
/**

@@ -116,3 +110,2 @@ * The type of a function under test. The first argument to this function is a

type TestFn = (t: TestContext, done: (result?: any) => void) => any;
/**

@@ -123,3 +116,2 @@ * The type of a function under Suite.

type SuiteFn = (done: (result?: any) => void) => void;
/**

@@ -130,3 +122,2 @@ * The type of a function under test.

type ItFn = (done: (result?: any) => void) => any;
interface RunOptions {

@@ -141,3 +132,2 @@ /**

concurrency?: number | boolean | undefined;
/**

@@ -148,3 +138,2 @@ * An array containing the list of files to run.

files?: readonly string[] | undefined;
/**

@@ -155,3 +144,2 @@ * Allows aborting an in-progress test execution.

signal?: AbortSignal | undefined;
/**

@@ -163,3 +151,2 @@ * A number of milliseconds the test will fail after.

timeout?: number | undefined;
/**

@@ -172,3 +159,2 @@ * Sets inspector port of test child process.

}
/**

@@ -218,3 +204,2 @@ * A successful call of the `run()` method will return a new `TestsStream` object,

}
interface DiagnosticData {

@@ -225,3 +210,2 @@ /**

message: string;
/**

@@ -232,3 +216,2 @@ * The nesting level of the test.

}
interface TestFail {

@@ -243,3 +226,2 @@ /**

duration: number;
/**

@@ -250,3 +232,2 @@ * The error thrown by the test.

};
/**

@@ -256,3 +237,2 @@ * The test name.

name: string;
/**

@@ -262,3 +242,2 @@ * The nesting level of the test.

nesting: number;
/**

@@ -268,3 +247,2 @@ * The ordinal number of the test.

testNumber: number;
/**

@@ -274,3 +252,2 @@ * Present if `context.todo` is called.

todo?: string | boolean;
/**

@@ -281,3 +258,2 @@ * Present if `context.skip` is called.

}
interface TestPass {

@@ -293,3 +269,2 @@ /**

};
/**

@@ -299,3 +274,2 @@ * The test name.

name: string;
/**

@@ -305,3 +279,2 @@ * The nesting level of the test.

nesting: number;
/**

@@ -311,3 +284,2 @@ * The ordinal number of the test.

testNumber: number;
/**

@@ -317,3 +289,2 @@ * Present if `context.todo` is called.

todo?: string | boolean;
/**

@@ -324,3 +295,2 @@ * Present if `context.skip` is called.

}
interface TestPlan {

@@ -331,3 +301,2 @@ /**

nesting: number;
/**

@@ -338,3 +307,2 @@ * The number of subtests that have ran.

}
interface TestStart {

@@ -345,3 +313,2 @@ /**

name: string;
/**

@@ -352,3 +319,2 @@ * The nesting level of the test.

}
/**

@@ -368,3 +334,2 @@ * An instance of `TestContext` is passed to each test function in order to interact with the

beforeEach: typeof beforeEach;
/**

@@ -378,3 +343,2 @@ * This function is used to create a hook that runs after the current test finishes.

after: typeof after;
/**

@@ -388,3 +352,2 @@ * This function is used to create a hook running after each subtest of the current test.

afterEach: typeof afterEach;
/**

@@ -397,3 +360,2 @@ * This function is used to write diagnostics to the output. Any diagnostic information is

diagnostic(message: string): void;
/**

@@ -404,3 +366,2 @@ * The name of the test.

readonly name: string;
/**

@@ -414,3 +375,2 @@ * If `shouldRunOnlyTests` is truthy, the test context will only run tests that have the `only`

runOnly(shouldRunOnlyTests: boolean): void;
/**

@@ -421,3 +381,2 @@ * Can be used to abort test subtasks when the test has been aborted.

readonly signal: AbortSignal;
/**

@@ -431,3 +390,2 @@ * This function causes the test's output to indicate the test as skipped. If `message` is

skip(message?: string): void;
/**

@@ -441,3 +399,2 @@ * This function adds a `TODO` directive to the test's output. If `message` is provided, it is

todo(message?: string): void;
/**

@@ -461,3 +418,2 @@ * This function is used to create subtests under the current test. This function behaves in

}
interface TestOptions {

@@ -473,3 +429,2 @@ /**

concurrency?: number | boolean | undefined;
/**

@@ -481,3 +436,2 @@ * If truthy, and the test context is configured to run `only` tests, then this test will be

only?: boolean | undefined;
/**

@@ -488,3 +442,2 @@ * Allows aborting an in-progress test.

signal?: AbortSignal | undefined;
/**

@@ -496,3 +449,2 @@ * If truthy, the test is skipped. If a string is provided, that string is displayed in the

skip?: boolean | string | undefined;
/**

@@ -505,3 +457,2 @@ * A number of milliseconds the test will fail after. If unspecified, subtests inherit this

timeout?: number | undefined;
/**

@@ -514,3 +465,2 @@ * If truthy, the test marked as `TODO`. If a string is provided, that string is displayed in

}
/**

@@ -524,3 +474,2 @@ * This function is used to create a hook running before running a suite.

function before(fn?: HookFn, options?: HookOptions): void;
/**

@@ -534,3 +483,2 @@ * This function is used to create a hook running after running a suite.

function after(fn?: HookFn, options?: HookOptions): void;
/**

@@ -544,3 +492,2 @@ * This function is used to create a hook running before each subtest of the current suite.

function beforeEach(fn?: HookFn, options?: HookOptions): void;
/**

@@ -554,3 +501,2 @@ * This function is used to create a hook running after each subtest of the current test.

function afterEach(fn?: HookFn, options?: HookOptions): void;
/**

@@ -561,3 +507,2 @@ * The hook function. If the hook uses callbacks, the callback function is passed as the

type HookFn = (done: (result?: any) => void) => any;
/**

@@ -572,3 +517,2 @@ * Configuration options for hooks.

signal?: AbortSignal | undefined;
/**

@@ -581,3 +525,2 @@ * A number of milliseconds the hook will fail after. If unspecified, subtests inherit this

}
interface MockFunctionOptions {

@@ -593,3 +536,2 @@ /**

}
interface MockMethodOptions extends MockFunctionOptions {

@@ -601,3 +543,2 @@ /**

getter?: boolean | undefined;
/**

@@ -609,13 +550,9 @@ * If `true`, `object[methodName]` is treated as a setter.

}
type Mock<F extends Function> = F & {
mock: MockFunctionContext<F>;
};
type NoOpFunction = (...args: any[]) => undefined;
type FunctionPropertyNames<T> = {
[K in keyof T]: T[K] extends Function ? K : never;
}[keyof T];
interface MockTracker {

@@ -631,3 +568,2 @@ /**

fn<F extends Function = NoOpFunction, Implementation extends Function = F>(original?: F, implementation?: Implementation, options?: MockFunctionOptions): Mock<F | Implementation>;
/**

@@ -695,3 +631,2 @@ * This function is used to create a mock on an existing object method.

): Mock<(() => MockedObject[MethodName]) | Implementation>;
/**

@@ -718,3 +653,2 @@ * This function is syntax sugar for {@link MockTracker.method} with `options.setter` set to `true`.

): Mock<((value: MockedObject[MethodName]) => void) | Implementation>;
/**

@@ -729,3 +663,2 @@ * This function restores the default behavior of all mocks that were previously created by this `MockTracker`

reset(): void;
/**

@@ -739,3 +672,2 @@ * This function restores the default behavior of all mocks that were previously created by this `MockTracker`.

const mock: MockTracker;
interface MockFunctionCall<

@@ -782,3 +714,2 @@ F extends Function,

}
interface MockFunctionContext<F extends Function> {

@@ -789,3 +720,2 @@ /**

readonly calls: Array<MockFunctionCall<F>>;
/**

@@ -797,3 +727,2 @@ * This function returns the number of times that this mock has been invoked.

callCount(): number;
/**

@@ -804,3 +733,2 @@ * This function is used to change the behavior of an existing mock.

mockImplementation(implementation: Function): void;
/**

@@ -815,3 +743,2 @@ * This function is used to change the behavior of an existing mock for a single invocation.

mockImplementationOnce(implementation: Function, onCall?: number): void;
/**

@@ -821,3 +748,2 @@ * Resets the call history of the mock function.

resetCalls(): void;
/**

@@ -829,4 +755,3 @@ * Resets the implementation of the mock function to its original behavior.

}
export { test as default, run, test, describe, it, before, after, beforeEach, afterEach, mock };
}
/**
* The `timer` module exposes a global API for scheduling functions to
* be called at some future period of time. Because the timer functions are
* globals, there is no need to call `require('timers')` to use the API.
* globals, there is no need to call `require('node:timers')` to use the API.
*

@@ -9,3 +9,3 @@ * The timer functions within Node.js implement a similar API as the timers API

* built around the Node.js [Event Loop](https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#setimmediate-vs-settimeout).
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/timers.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/timers.js)
*/

@@ -12,0 +12,0 @@ declare module 'timers' {

/**
* The `timers/promises` API provides an alternative set of timer functions
* that return `Promise` objects. The API is accessible via`require('timers/promises')`.
* that return `Promise` objects. The API is accessible via`require('node:timers/promises')`.
*

@@ -47,2 +47,4 @@ * ```js

* Returns an async iterator that generates values in an interval of `delay` ms.
* If `ref` is `true`, you need to call `next()` of async iterator explicitly
* or implicitly to keep the event loop alive.
*

@@ -66,3 +68,2 @@ * ```js

function setInterval<T = void>(delay?: number, value?: T, options?: TimerOptions): AsyncIterable<T>;
interface Scheduler {

@@ -90,3 +91,2 @@ /**

}
const scheduler: Scheduler;

@@ -93,0 +93,0 @@ }

/**
* The `tls` module provides an implementation of the Transport Layer Security
* The `node:tls` module provides an implementation of the Transport Layer Security
* (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL.

@@ -7,5 +7,5 @@ * The module can be accessed using:

* ```js
* const tls = require('tls');
* const tls = require('node:tls');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tls.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/tls.js)
*/

@@ -216,3 +216,3 @@ declare module 'tls' {

*
* Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate} will only return data while the
* Methods that return TLS connection metadata (e.g.{@link TLSSocket.getPeerCertificate}) will only return data while the
* connection is open.

@@ -264,9 +264,9 @@ * @since v0.11.4

*
* For example:
* For example, a TLSv1.2 protocol with AES256-SHA cipher:
*
* ```json
* {
* "name": "AES128-SHA256",
* "standardName": "TLS_RSA_WITH_AES_128_CBC_SHA256",
* "version": "TLSv1.2"
* "name": "AES256-SHA",
* "standardName": "TLS_RSA_WITH_AES_256_CBC_SHA",
* "version": "SSLv3"
* }

@@ -918,3 +918,3 @@ * ```

*
* The `ticketKeys` options is automatically shared between `cluster` module
* The `ticketKeys` options is automatically shared between `node:cluster` module
* workers.

@@ -925,4 +925,4 @@ *

* ```js
* const tls = require('tls');
* const fs = require('fs');
* const tls = require('node:tls');
* const fs = require('node:fs');
*

@@ -937,3 +937,3 @@ * const options = {

* // This is necessary only if the client uses a self-signed certificate.
* ca: [ fs.readFileSync('client-cert.pem') ]
* ca: [ fs.readFileSync('client-cert.pem') ],
* };

@@ -973,4 +973,4 @@ *

* // Assumes an echo server that is listening on port 8000.
* const tls = require('tls');
* const fs = require('fs');
* const tls = require('node:tls');
* const fs = require('node:fs');
*

@@ -1051,3 +1051,4 @@ * const options = {

* The `tls.createSecureContext()` method creates a `SecureContext` object. It is
* usable as an argument to several `tls` APIs, such as {@link createServer} and `server.addContext()`, but has no public methods.
* usable as an argument to several `tls` APIs, such as `server.addContext()`,
* but has no public methods. The {@link Server} constructor and the {@link createServer} method do not support the `secureContext` option.
*

@@ -1058,2 +1059,8 @@ * A key is _required_ for ciphers that use certificates. Either `key` or`pfx` can be used to provide it.

* CAs](https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt).
*
* Custom DHE parameters are discouraged in favor of the new `dhparam: 'auto'`option. When set to `'auto'`, well-known DHE parameters of sufficient strength
* will be selected automatically. Otherwise, if necessary, `openssl dhparam` can
* be used to create custom parameters. The key length must be greater than or
* equal to 1024 bits or else an error will be thrown. Although 1024 bits is
* permissible, use 2048 bits or larger for stronger security.
* @since v0.11.13

@@ -1060,0 +1067,0 @@ */

/**
* The `trace_events` module provides a mechanism to centralize tracing information
* generated by V8, Node.js core, and userspace code.
* The `node:trace_events` module provides a mechanism to centralize tracing
* information generated by V8, Node.js core, and userspace code.
*
* Tracing can be enabled with the `--trace-event-categories` command-line flag
* or by using the `trace_events` module. The `--trace-event-categories` flag
* or by using the `node:trace_events` module. The `--trace-event-categories` flag
* accepts a list of comma-separated category names.

@@ -16,5 +16,15 @@ *

* * `node.console`: Enables capture of `console.time()` and `console.count()`output.
* * `node.threadpoolwork.sync`: Enables capture of trace data for threadpool
* synchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
* * `node.threadpoolwork.async`: Enables capture of trace data for threadpool
* asynchronous operations, such as `blob`, `zlib`, `crypto` and `node_api`.
* * `node.dns.native`: Enables capture of trace data for DNS queries.
* * `node.net.native`: Enables capture of trace data for network.
* * `node.environment`: Enables capture of Node.js Environment milestones.
* * `node.fs.sync`: Enables capture of trace data for file system sync methods.
* * `node.fs_dir.sync`: Enables capture of trace data for file system sync
* directory methods.
* * `node.fs.async`: Enables capture of trace data for file system async methods.
* * `node.fs_dir.async`: Enables capture of trace data for file system async
* directory methods.
* * `node.perf`: Enables capture of `Performance API` measurements.

@@ -27,4 +37,5 @@ * * `node.perf.usertiming`: Enables capture of only Performance API User Timing

* of unhandled Promise rejections and handled-after-rejections.
* * `node.vm.script`: Enables capture of trace data for the `vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
* * `node.vm.script`: Enables capture of trace data for the `node:vm` module's`runInNewContext()`, `runInContext()`, and `runInThisContext()` methods.
* * `v8`: The `V8` events are GC, compiling, and execution related.
* * `node.http`: Enables capture of trace data for http request / response.
*

@@ -48,6 +59,6 @@ * By default the `node`, `node.async_hooks`, and `v8` categories are enabled.

*
* Alternatively, trace events may be enabled using the `trace_events` module:
* Alternatively, trace events may be enabled using the `node:trace_events` module:
*
* ```js
* const trace_events = require('trace_events');
* const trace_events = require('node:trace_events');
* const tracing = trace_events.createTracing({ categories: ['node.perf'] });

@@ -89,3 +100,3 @@ * tracing.enable(); // Enable trace event capture for the 'node.perf' category

* @experimental
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/trace_events.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/trace_events.js)
*/

@@ -139,3 +150,3 @@ declare module 'trace_events' {

* ```js
* const trace_events = require('trace_events');
* const trace_events = require('node:trace_events');
* const categories = ['node.perf', 'node.async_hooks'];

@@ -160,3 +171,3 @@ * const tracing = trace_events.createTracing({ categories });

* ```js
* const trace_events = require('trace_events');
* const trace_events = require('node:trace_events');
* const t1 = trace_events.createTracing({ categories: ['node.async_hooks'] });

@@ -163,0 +174,0 @@ * const t2 = trace_events.createTracing({ categories: ['node.perf'] });

/**
* The `tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes.
* In most cases, it will not be necessary or possible to use this module directly.
* However, it can be accessed using:
* The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream`classes. In most cases, it will not be necessary or possible to use this module
* directly. However, it can be accessed using:
*
* ```js
* const tty = require('tty');
* const tty = require('node:tty');
* ```

@@ -25,3 +24,3 @@ *

* manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tty.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/tty.js)
*/

@@ -28,0 +27,0 @@ declare module 'tty' {

/**
* The `url` module provides utilities for URL resolution and parsing. It can be
* accessed using:
* The `node:url` module provides utilities for URL resolution and parsing. It can
* be accessed using:
*
* ```js
* import url from 'url';
* import url from 'node:url';
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/url.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/url.js)
*/

@@ -57,13 +57,7 @@ declare module 'url' {

*
* Use of the legacy `url.parse()` method is discouraged. Users should
* use the WHATWG `URL` API. Because the `url.parse()` method uses a
* lenient, non-standard algorithm for parsing URL strings, security
* issues can be introduced. Specifically, issues with [host name spoofing](https://hackerone.com/reports/678487) and
* incorrect handling of usernames and passwords have been identified.
*
* Deprecation of this API has been shelved for now primarily due to the the
* inability of the [WHATWG API to parse relative URLs](https://github.com/nodejs/node/issues/12682#issuecomment-1154492373).
* [Discussions are ongoing](https://github.com/whatwg/url/issues/531) for the best way to resolve this.
*
* `url.parse()` uses a lenient, non-standard algorithm for parsing URL
* strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted
* input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead.
* @since v0.1.25
* @deprecated Use the WHATWG URL API instead.
* @param urlString The URL string to parse.

@@ -83,3 +77,3 @@ * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property

* ```js
* const url = require('url');
* const url = require('node:url');
* url.format({

@@ -91,4 +85,4 @@ * protocol: 'https',

* page: 1,
* format: 'json'
* }
* format: 'json',
* },
* });

@@ -214,3 +208,3 @@ *

* ```js
* const url = require('url');
* const url = require('node:url');
* url.resolve('/one/two/three', 'four'); // '/one/two/four'

@@ -250,6 +244,4 @@ * url.resolve('http://example.com/', '/one'); // 'http://example.com/one'

*
* This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged.
*
* ```js
* import url from 'url';
* import url from 'node:url';
*

@@ -272,6 +264,4 @@ * console.log(url.domainToASCII('español.com'));

*
* This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged.
*
* ```js
* import url from 'url';
* import url from 'node:url';
*

@@ -293,3 +283,3 @@ * console.log(url.domainToUnicode('xn--espaol-zwa.com'));

* ```js
* import { fileURLToPath } from 'url';
* import { fileURLToPath } from 'node:url';
*

@@ -320,3 +310,3 @@ * const __filename = fileURLToPath(import.meta.url);

* ```js
* import { pathToFileURL } from 'url';
* import { pathToFileURL } from 'node:url';
*

@@ -339,3 +329,3 @@ * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1

* ```js
* import { urlToHttpOptions } from 'url';
* import { urlToHttpOptions } from 'node:url';
* const myURL = new URL('https://a:b@測試?abc#foo');

@@ -388,3 +378,3 @@ *

* resolveObjectURL,
* } = require('buffer');
* } = require('node:buffer');
*

@@ -411,3 +401,3 @@ * const blob = new Blob(['hello']);

* Removes the stored `Blob` identified by the given ID. Attempting to revoke a
* ID that isn’t registered will silently fail.
* ID that isn't registered will silently fail.
* @since v16.7.0

@@ -463,3 +453,3 @@ * @experimental

* // Setting the hostname does not change the port
* myURL.hostname = 'example.com:82';
* myURL.hostname = 'example.com';
* console.log(myURL.href);

@@ -527,3 +517,3 @@ * // Prints https://example.com:81/foo

* console.log(myURL.href);
* // Prints https://abc:123@example.com
* // Prints https://abc:123@example.com/
* ```

@@ -672,10 +662,10 @@ *

* ```js
* const myUrl = new URL('https://example.org/abc?foo=~bar');
* const myURL = new URL('https://example.org/abc?foo=~bar');
*
* console.log(myUrl.search); // prints ?foo=~bar
* console.log(myURL.search); // prints ?foo=~bar
*
* // Modify the URL via searchParams...
* myUrl.searchParams.sort();
* myURL.searchParams.sort();
*
* console.log(myUrl.search); // prints ?foo=%7Ebar
* console.log(myURL.search); // prints ?foo=%7Ebar
* ```

@@ -852,3 +842,3 @@ */

* The total number of parameter entries.
* @since v18.16.0
* @since v19.8.0
*/

@@ -855,0 +845,0 @@ readonly size: number;

/**
* The `v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
* The `node:v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
*
* ```js
* const v8 = require('v8');
* const v8 = require('node:v8');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/v8.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/v8.js)
*/

@@ -71,2 +71,11 @@ declare module 'v8' {

*
* `total_global_handles_size` The value of total\_global\_handles\_size is the
* total memory size of V8 global handles.
*
* `used_global_handles_size` The value of used\_global\_handles\_size is the
* used memory size of V8 global handles.
*
* `external_memory` The value of external\_memory is the memory size of array
* buffers and external strings.
*
* ```js

@@ -84,3 +93,6 @@ * {

* number_of_native_contexts: 1,
* number_of_detached_contexts: 0
* number_of_detached_contexts: 0,
* total_global_handles_size: 8192,
* used_global_handles_size: 3296,
* external_memory: 318824
* }

@@ -154,3 +166,3 @@ * ```

* // Print GC events to stdout for one minute.
* const v8 = require('v8');
* const v8 = require('node:v8');
* v8.setFlagsFromString('--trace_gc');

@@ -178,3 +190,3 @@ * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);

* // Print heap snapshot to the console
* const v8 = require('v8');
* const v8 = require('node:v8');
* const stream = v8.getHeapSnapshot();

@@ -184,3 +196,3 @@ * stream.pipe(process.stdout);

* @since v11.13.0
* @return A Readable Stream containing the V8 heap snapshot
* @return A Readable containing the V8 heap snapshot.
*/

@@ -205,8 +217,8 @@ function getHeapSnapshot(): Readable;

* ```js
* const { writeHeapSnapshot } = require('v8');
* const { writeHeapSnapshot } = require('node:v8');
* const {
* Worker,
* isMainThread,
* parentPort
* } = require('worker_threads');
* parentPort,
* } = require('node:worker_threads');
*

@@ -242,3 +254,5 @@ * if (isMainThread) {

/**
* Returns an object with the following properties:
* Get statistics about code and its metadata in the heap, see
* V8[`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the
* following properties:
*

@@ -249,3 +263,4 @@ * ```js

* bytecode_and_metadata_size: 161368,
* external_script_source_size: 1410794
* external_script_source_size: 1410794,
* cpu_profiler_metadata_size: 0,
* }

@@ -300,3 +315,3 @@ * ```

/**
* Write raw bytes into the serializer’s internal buffer. The deserializer
* Write raw bytes into the serializer's internal buffer. The deserializer
* will require a way to compute the length of the buffer.

@@ -357,3 +372,3 @@ * For use inside of a custom `serializer._writeHostObject()`.

/**
* Read raw bytes from the deserializer’s internal buffer. The `length` parameter
* Read raw bytes from the deserializer's internal buffer. The `length` parameter
* must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`.

@@ -403,5 +418,5 @@ * For use inside of a custom `deserializer._readHostObject()`.

function stopCoverage(): void;
/**
* This API collects GC data in current thread.
* @since v19.6.0, v18.15.0
*/

@@ -411,6 +426,82 @@ class GCProfiler {

* Start collecting GC data.
* @since v19.6.0, v18.15.0
*/
start(): void;
/**
* Stop collecting GC data and return a object.
* Stop collecting GC data and return an object.The content of object
* is as follows.
*
* ```json
* {
* "version": 1,
* "startTime": 1674059033862,
* "statistics": [
* {
* "gcType": "Scavenge",
* "beforeGC": {
* "heapStatistics": {
* "totalHeapSize": 5005312,
* "totalHeapSizeExecutable": 524288,
* "totalPhysicalSize": 5226496,
* "totalAvailableSize": 4341325216,
* "totalGlobalHandlesSize": 8192,
* "usedGlobalHandlesSize": 2112,
* "usedHeapSize": 4883840,
* "heapSizeLimit": 4345298944,
* "mallocedMemory": 254128,
* "externalMemory": 225138,
* "peakMallocedMemory": 181760
* },
* "heapSpaceStatistics": [
* {
* "spaceName": "read_only_space",
* "spaceSize": 0,
* "spaceUsedSize": 0,
* "spaceAvailableSize": 0,
* "physicalSpaceSize": 0
* }
* ]
* },
* "cost": 1574.14,
* "afterGC": {
* "heapStatistics": {
* "totalHeapSize": 6053888,
* "totalHeapSizeExecutable": 524288,
* "totalPhysicalSize": 5500928,
* "totalAvailableSize": 4341101384,
* "totalGlobalHandlesSize": 8192,
* "usedGlobalHandlesSize": 2112,
* "usedHeapSize": 4059096,
* "heapSizeLimit": 4345298944,
* "mallocedMemory": 254128,
* "externalMemory": 225138,
* "peakMallocedMemory": 181760
* },
* "heapSpaceStatistics": [
* {
* "spaceName": "read_only_space",
* "spaceSize": 0,
* "spaceUsedSize": 0,
* "spaceAvailableSize": 0,
* "physicalSpaceSize": 0
* }
* ]
* }
* }
* ],
* "endTime": 1674059036865
* }
* ```
*
* Here's an example.
*
* ```js
* const { GCProfiler } = require('v8');
* const profiler = new GCProfiler();
* profiler.start();
* setTimeout(() => {
* console.log(profiler.stop());
* }, 1000);
* ```
* @since v19.6.0, v18.15.0
*/

@@ -417,0 +508,0 @@ stop(): GCProfilerResult;

/**
* The `vm` module enables compiling and running code within V8 Virtual
* The `node:vm` module enables compiling and running code within V8 Virtual
* Machine contexts.
*
* **The `vm` module is not a security**
* **The `node:vm` module is not a security**
* **mechanism. Do not use it to run untrusted code.**

@@ -20,3 +20,3 @@ *

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*

@@ -38,3 +38,3 @@ * const x = 1;

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/vm.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/vm.js)
*/

@@ -203,7 +203,7 @@ declare module 'vm' {

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*
* const context = {
* animal: 'cat',
* count: 2
* count: 2,
* };

@@ -240,3 +240,3 @@ *

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*

@@ -266,3 +266,3 @@ * const script = new vm.Script('globalVar = "set"');

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*

@@ -289,2 +289,12 @@ * global.globalVar = 0;

*
* The code cache of the `Script` doesn't contain any JavaScript observable
* states. The code cache is safe to be saved along side the script source and
* used to construct new `Script` instances multiple times.
*
* Functions in the `Script` source can be marked as lazily compiled and they are
* not compiled at construction of the `Script`. These functions are going to be
* compiled when they are invoked the first time. The code cache serializes the
* metadata that V8 currently knows about the `Script` that it can use to speed up
* future compilations.
*
* ```js

@@ -299,7 +309,10 @@ * const script = new vm.Script(`

*
* const cacheWithoutX = script.createCachedData();
* const cacheWithoutAdd = script.createCachedData();
* // In `cacheWithoutAdd` the function `add()` is marked for full compilation
* // upon invocation.
*
* script.runInThisContext();
*
* const cacheWithX = script.createCachedData();
* const cacheWithAdd = script.createCachedData();
* // `cacheWithAdd` contains fully compiled function `add()`.
* ```

@@ -311,6 +324,26 @@ * @since v10.6.0

cachedDataProduced?: boolean | undefined;
/**
* When `cachedData` is supplied to create the `vm.Script`, this value will be set
* to either `true` or `false` depending on acceptance of the data by V8\.
* Otherwise the value is `undefined`.
* @since v5.7.0
*/
cachedDataRejected?: boolean | undefined;
cachedData?: Buffer | undefined;
/**
* When the script is compiled from a source that contains a source map magic comment, this property will be set to the URL of the source map.
* When the script is compiled from a source that contains a source map magic
* comment, this property will be set to the URL of the source map.
*
* ```js
* import vm from 'node:vm';
*
* const script = new vm.Script(`
* function myFunc() {}
* //# sourceMappingURL=sourcemap.json
* `);
*
* console.log(script.sourceMapURL);
* // Prints: sourcemap.json
* ```
* @since v19.1.0, v18.13.0
*/

@@ -327,3 +360,3 @@ sourceMapURL?: string | undefined;

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*

@@ -375,3 +408,3 @@ * global.globalVar = 3;

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*

@@ -405,7 +438,7 @@ * const contextObject = { globalVar: 1 };

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*
* const contextObject = {
* animal: 'cat',
* count: 2
* count: 2,
* };

@@ -434,3 +467,3 @@ *

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
* let localVar = 'initial value';

@@ -456,13 +489,13 @@ *

*
* In order to run a simple web server using the `http` module the code passed to
* the context must either call `require('http')` on its own, or have a reference
* to the `http` module passed to it. For instance:
* In order to run a simple web server using the `node:http` module the code passed
* to the context must either call `require('node:http')` on its own, or have a
* reference to the `node:http` module passed to it. For instance:
*
* ```js
* 'use strict';
* const vm = require('vm');
* const vm = require('node:vm');
*
* const code = `
* ((require) => {
* const http = require('http');
* const http = require('node:http');
*

@@ -496,3 +529,7 @@ * http.createServer((request, response) => {

*/
function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function & {
function compileFunction(
code: string,
params?: ReadonlyArray<string>,
options?: CompileFunctionOptions
): Function & {
cachedData?: Script['cachedData'] | undefined;

@@ -515,3 +552,3 @@ cachedDataProduced?: Script['cachedDataProduced'] | undefined;

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
* // Measure the memory used by the main context.

@@ -559,3 +596,2 @@ * vm.measureMemory({ mode: 'summary' })

function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
interface ModuleEvaluateOptions {

@@ -565,12 +601,124 @@ timeout?: RunningScriptOptions['timeout'] | undefined;

}
type ModuleLinker = (specifier: string, referencingModule: Module, extra: { assert: Object }) => Module | Promise<Module>;
type ModuleLinker = (
specifier: string,
referencingModule: Module,
extra: {
assert: Object;
}
) => Module | Promise<Module>;
type ModuleStatus = 'unlinked' | 'linking' | 'linked' | 'evaluating' | 'evaluated' | 'errored';
/**
* This feature is only available with the `--experimental-vm-modules` command
* flag enabled.
*
* The `vm.Module` class provides a low-level interface for using
* ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`class that closely mirrors [Module Record](https://www.ecma-international.org/ecma-262/#sec-abstract-module-records)
* s as defined in the ECMAScript
* specification.
*
* Unlike `vm.Script` however, every `vm.Module` object is bound to a context from
* its creation. Operations on `vm.Module` objects are intrinsically asynchronous,
* in contrast with the synchronous nature of `vm.Script` objects. The use of
* 'async' functions can help with manipulating `vm.Module` objects.
*
* Using a `vm.Module` object requires three distinct steps: creation/parsing,
* linking, and evaluation. These three steps are illustrated in the following
* example.
*
* This implementation lies at a lower level than the `ECMAScript Module
* loader`. There is also no way to interact with the Loader yet, though
* support is planned.
*
* ```js
* import vm from 'node:vm';
*
* const contextifiedObject = vm.createContext({
* secret: 42,
* print: console.log,
* });
*
* // Step 1
* //
* // Create a Module by constructing a new `vm.SourceTextModule` object. This
* // parses the provided source text, throwing a `SyntaxError` if anything goes
* // wrong. By default, a Module is created in the top context. But here, we
* // specify `contextifiedObject` as the context this Module belongs to.
* //
* // Here, we attempt to obtain the default export from the module "foo", and
* // put it into local binding "secret".
*
* const bar = new vm.SourceTextModule(`
* import s from 'foo';
* s;
* print(s);
* `, { context: contextifiedObject });
*
* // Step 2
* //
* // "Link" the imported dependencies of this Module to it.
* //
* // The provided linking callback (the "linker") accepts two arguments: the
* // parent module (`bar` in this case) and the string that is the specifier of
* // the imported module. The callback is expected to return a Module that
* // corresponds to the provided specifier, with certain requirements documented
* // in `module.link()`.
* //
* // If linking has not started for the returned Module, the same linker
* // callback will be called on the returned Module.
* //
* // Even top-level Modules without dependencies must be explicitly linked. The
* // callback provided would never be called, however.
* //
* // The link() method returns a Promise that will be resolved when all the
* // Promises returned by the linker resolve.
* //
* // Note: This is a contrived example in that the linker function creates a new
* // "foo" module every time it is called. In a full-fledged module system, a
* // cache would probably be used to avoid duplicated modules.
*
* async function linker(specifier, referencingModule) {
* if (specifier === 'foo') {
* return new vm.SourceTextModule(`
* // The "secret" variable refers to the global variable we added to
* // "contextifiedObject" when creating the context.
* export default secret;
* `, { context: referencingModule.context });
*
* // Using `contextifiedObject` instead of `referencingModule.context`
* // here would work as well.
* }
* throw new Error(`Unable to resolve dependency: ${specifier}`);
* }
* await bar.link(linker);
*
* // Step 3
* //
* // Evaluate the Module. The evaluate() method returns a promise which will
* // resolve after the module has finished evaluating.
*
* // Prints 42.
* await bar.evaluate();
* ```
* @since v13.0.0, v12.16.0
* @experimental
*/
class Module {
/**
* The specifiers of all dependencies of this module.
* The specifiers of all dependencies of this module. The returned array is frozen
* to disallow any changes to it.
*
* Corresponds to the `[[RequestedModules]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
* the ECMAScript specification.
*/
dependencySpecifiers: readonly string[];
/**
* If the `module.status` is `'errored'`, this property contains the exception thrown by the module during evaluation.
* If the status is anything else, accessing this property will result in a thrown exception.
* If the `module.status` is `'errored'`, this property contains the exception
* thrown by the module during evaluation. If the status is anything else,
* accessing this property will result in a thrown exception.
*
* The value `undefined` cannot be used for cases where there is not a thrown
* exception due to possible ambiguity with `throw undefined;`.
*
* Corresponds to the `[[EvaluationError]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s
* in the ECMAScript specification.
*/

@@ -584,7 +732,25 @@ error: any;

/**
* The namespace object of the module. This is only available after linking (`module.link()`) has completed.
* The namespace object of the module. This is only available after linking
* (`module.link()`) has completed.
*
* Corresponds to the [GetModuleNamespace](https://tc39.es/ecma262/#sec-getmodulenamespace) abstract operation in the ECMAScript
* specification.
*/
namespace: Object;
/**
* The current status of the module.
* The current status of the module. Will be one of:
*
* * `'unlinked'`: `module.link()` has not yet been called.
* * `'linking'`: `module.link()` has been called, but not all Promises returned
* by the linker function have been resolved yet.
* * `'linked'`: The module has been linked successfully, and all of its
* dependencies are linked, but `module.evaluate()` has not yet been called.
* * `'evaluating'`: The module is being evaluated through a `module.evaluate()` on
* itself or a parent module.
* * `'evaluated'`: The module has been successfully evaluated.
* * `'errored'`: The module has been evaluated, but an exception was thrown.
*
* Other than `'errored'`, this status string corresponds to the specification's [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records)'s `[[Status]]` field. `'errored'`
* corresponds to`'evaluated'` in the specification, but with `[[EvaluationError]]` set to a
* value that is not `undefined`.
*/

@@ -595,16 +761,50 @@ status: ModuleStatus;

*
* This must be called after the module has been linked; otherwise it will reject
* It could be called also when the module has already been evaluated, in which case it will either do nothing
* if the initial evaluation ended in success (`module.status` is `'evaluated'`) or it will re-throw the exception
* that the initial evaluation resulted in (`module.status` is `'errored'`).
* This must be called after the module has been linked; otherwise it will reject.
* It could be called also when the module has already been evaluated, in which
* case it will either do nothing if the initial evaluation ended in success
* (`module.status` is `'evaluated'`) or it will re-throw the exception that the
* initial evaluation resulted in (`module.status` is `'errored'`).
*
* This method cannot be called while the module is being evaluated (`module.status` is `'evaluating'`).
* This method cannot be called while the module is being evaluated
* (`module.status` is `'evaluating'`).
*
* Corresponds to the [Evaluate() concrete method](https://tc39.es/ecma262/#sec-moduleevaluation) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in the
* ECMAScript specification.
* @return Fulfills with `undefined` upon success.
*/
evaluate(options?: ModuleEvaluateOptions): Promise<void>;
/**
* Link module dependencies. This method must be called before evaluation, and can only be called once per module.
* Link module dependencies. This method must be called before evaluation, and
* can only be called once per module.
*
* The function is expected to return a `Module` object or a `Promise` that
* eventually resolves to a `Module` object. The returned `Module` must satisfy the
* following two invariants:
*
* * It must belong to the same context as the parent `Module`.
* * Its `status` must not be `'errored'`.
*
* If the returned `Module`'s `status` is `'unlinked'`, this method will be
* recursively called on the returned `Module` with the same provided `linker`function.
*
* `link()` returns a `Promise` that will either get resolved when all linking
* instances resolve to a valid `Module`, or rejected if the linker function either
* throws an exception or returns an invalid `Module`.
*
* The linker function roughly corresponds to the implementation-defined [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) abstract operation in the
* ECMAScript
* specification, with a few key differences:
*
* * The linker function is allowed to be asynchronous while [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) is synchronous.
*
* The actual [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) implementation used during module
* linking is one that returns the modules linked during linking. Since at
* that point all modules would have been fully linked already, the [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) implementation is fully synchronous per
* specification.
*
* Corresponds to the [Link() concrete method](https://tc39.es/ecma262/#sec-moduledeclarationlinking) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
* the ECMAScript specification.
*/
link(linker: ModuleLinker): Promise<void>;
}
interface SourceTextModuleOptions {

@@ -626,2 +826,13 @@ /**

}
/**
* This feature is only available with the `--experimental-vm-modules` command
* flag enabled.
*
*
*
* The `vm.SourceTextModule` class provides the [Source Text Module Record](https://tc39.es/ecma262/#sec-source-text-module-records) as
* defined in the ECMAScript specification.
* @since v9.6.0
* @experimental
*/
class SourceTextModule extends Module {

@@ -634,3 +845,2 @@ /**

}
interface SyntheticModuleOptions {

@@ -647,2 +857,27 @@ /**

}
/**
* This feature is only available with the `--experimental-vm-modules` command
* flag enabled.
*
*
*
* The `vm.SyntheticModule` class provides the [Synthetic Module Record](https://heycam.github.io/webidl/#synthetic-module-records) as
* defined in the WebIDL specification. The purpose of synthetic modules is to
* provide a generic interface for exposing non-JavaScript sources to ECMAScript
* module graphs.
*
* ```js
* const vm = require('node:vm');
*
* const source = '{ "a": 1 }';
* const module = new vm.SyntheticModule(['default'], function() {
* const obj = JSON.parse(source);
* this.setExport('default', obj);
* });
*
* // Use `module` in linking...
* ```
* @since v13.0.0, v12.16.0
* @experimental
*/
class SyntheticModule extends Module {

@@ -656,6 +891,21 @@ /**

/**
* This method is used after the module is linked to set the values of exports.
* If it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error will be thrown.
* @param name
* @param value
* This method is used after the module is linked to set the values of exports. If
* it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error
* will be thrown.
*
* ```js
* import vm from 'node:vm';
*
* const m = new vm.SyntheticModule(['x'], () => {
* m.setExport('x', 1);
* });
*
* await m.link(() => {});
* await m.evaluate();
*
* assert.strictEqual(m.namespace.x, 1);
* ```
* @since v13.0.0, v12.16.0
* @param name Name of the export to set.
* @param value The value to set the export to.
*/

@@ -662,0 +912,0 @@ setExport(name: string, value: any): void;

@@ -6,22 +6,19 @@ /**

* ```js
* import { readFile } from 'fs/promises';
* import { readFile } from 'node:fs/promises';
* import { WASI } from 'wasi';
* import { argv, env } from 'process';
* import { argv, env } from 'node:process';
*
* const wasi = new WASI({
* version: 'preview1',
* args: argv,
* env,
* preopens: {
* '/sandbox': '/some/real/path/that/wasm/can/access'
* }
* '/sandbox': '/some/real/path/that/wasm/can/access',
* },
* });
*
* // Some WASI binaries require:
* // const importObject = { wasi_unstable: wasi.wasiImport };
* const importObject = { wasi_snapshot_preview1: wasi.wasiImport };
*
* const wasm = await WebAssembly.compile(
* await readFile(new URL('./demo.wasm', import.meta.url))
* await readFile(new URL('./demo.wasm', import.meta.url)),
* );
* const instance = await WebAssembly.instantiate(wasm, importObject);
* const instance = await WebAssembly.instantiate(wasm, wasi.getImportObject());
*

@@ -68,7 +65,4 @@ * wasi.start(instance);

* ```
*
* The `--experimental-wasi-unstable-preview1` CLI argument is needed for this
* example to run.
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/wasi.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/wasi.js)
*/

@@ -75,0 +69,0 @@ declare module 'wasi' {

/**
* The `worker_threads` module enables the use of threads that execute JavaScript
* in parallel. To access it:
* The `node:worker_threads` module enables the use of threads that execute
* JavaScript in parallel. To access it:
*
* ```js
* const worker = require('worker_threads');
* const worker = require('node:worker_threads');
* ```

@@ -18,4 +18,4 @@ *

* const {
* Worker, isMainThread, parentPort, workerData
* } = require('worker_threads');
* Worker, isMainThread, parentPort, workerData,
* } = require('node:worker_threads');
*

@@ -26,3 +26,3 @@ * if (isMainThread) {

* const worker = new Worker(__filename, {
* workerData: script
* workerData: script,
* });

@@ -54,3 +54,3 @@ * worker.on('message', resolve);

* specifically `argv` and `execArgv` options.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/worker_threads.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/worker_threads.js)
*/

@@ -78,3 +78,3 @@ declare module 'worker_threads' {

* ```js
* const { MessageChannel } = require('worker_threads');
* const { MessageChannel } = require('node:worker_threads');
*

@@ -128,3 +128,3 @@ * const { port1, port2 } = new MessageChannel();

* ```js
* const { MessageChannel } = require('worker_threads');
* const { MessageChannel } = require('node:worker_threads');
* const { port1, port2 } = new MessageChannel();

@@ -140,3 +140,3 @@ *

*
* `transferList` may be a list of [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), `MessagePort` and `FileHandle` objects.
* `transferList` may be a list of [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), `MessagePort`, and `FileHandle` objects.
* After transferring, they are not usable on the sending side of the channel

@@ -152,3 +152,3 @@ * anymore (even if they are not contained in `value`). Unlike with `child processes`, transferring handles such as network sockets is currently

* ```js
* const { MessageChannel } = require('worker_threads');
* const { MessageChannel } = require('node:worker_threads');
* const { port1, port2 } = new MessageChannel();

@@ -180,3 +180,3 @@ *

* For more information on the serialization and deserialization mechanisms
* behind this API, see the `serialization API of the v8 module`.
* behind this API, see the `serialization API of the node:v8 module`.
* @since v10.5.0

@@ -305,5 +305,5 @@ */

*
* * The `process.stdin`, `process.stdout` and `process.stderr` may be redirected by the parent thread.
* * The `require('worker_threads').isMainThread` property is set to `false`.
* * The `require('worker_threads').parentPort` message port is available.
* * The `process.stdin`, `process.stdout`, and `process.stderr` streams may be redirected by the parent thread.
* * The `require('node:worker_threads').isMainThread` property is set to `false`.
* * The `require('node:worker_threads').parentPort` message port is available.
* * `process.exit()` does not stop the whole program, just the single thread,

@@ -325,7 +325,7 @@ * and `process.abort()` is not available.

*
* Like [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) and the `cluster module`, two-way communication can be
* achieved through inter-thread message passing. Internally, a `Worker` has a
* built-in pair of `MessagePort` s that are already associated with each other
* when the `Worker` is created. While the `MessagePort` object on the parent side
* is not directly exposed, its functionalities are exposed through `worker.postMessage()` and the `worker.on('message')` event
* Like [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) and the `node:cluster module`, two-way communication
* can be achieved through inter-thread message passing. Internally, a `Worker` has
* a built-in pair of `MessagePort` s that are already associated with each
* other when the `Worker` is created. While the `MessagePort` object on the parent
* side is not directly exposed, its functionalities are exposed through `worker.postMessage()` and the `worker.on('message')` event
* on the `Worker` object for the parent thread.

@@ -343,6 +343,6 @@ *

* ```js
* const assert = require('assert');
* const assert = require('node:assert');
* const {
* Worker, MessageChannel, MessagePort, isMainThread, parentPort
* } = require('worker_threads');
* Worker, MessageChannel, MessagePort, isMainThread, parentPort,
* } = require('node:worker_threads');
* if (isMainThread) {

@@ -387,3 +387,3 @@ * const worker = new Worker(__filename);

* An integer identifier for the referenced thread. Inside the worker thread,
* it is available as `require('worker_threads').threadId`.
* it is available as `require('node:worker_threads').threadId`.
* This value is unique for each `Worker` instance inside a single process.

@@ -415,3 +415,3 @@ * @since v10.5.0

/**
* Send a message to the worker that is received via `require('worker_threads').parentPort.on('message')`.
* Send a message to the worker that is received via `require('node:worker_threads').parentPort.on('message')`.
* See `port.postMessage()` for more details.

@@ -510,4 +510,4 @@ * @since v10.5.0

* BroadcastChannel,
* Worker
* } = require('worker_threads');
* Worker,
* } = require('node:worker_threads');
*

@@ -566,3 +566,3 @@ * const bc = new BroadcastChannel('hello');

* ```js
* const { MessageChannel, markAsUntransferable } = require('worker_threads');
* const { MessageChannel, markAsUntransferable } = require('node:worker_threads');
*

@@ -609,6 +609,6 @@ * const pooledBuffer = new ArrayBuffer(8);

* Receive a single message from a given `MessagePort`. If no message is available,`undefined` is returned, otherwise an object with a single `message` property
* that contains the message payload, corresponding to the oldest message in the`MessagePort`’s queue.
* that contains the message payload, corresponding to the oldest message in the`MessagePort`'s queue.
*
* ```js
* const { MessageChannel, receiveMessageOnPort } = require('worker_threads');
* const { MessageChannel, receiveMessageOnPort } = require('node:worker_threads');
* const { port1, port2 } = new MessageChannel();

@@ -644,3 +644,3 @@ * port1.postMessage({ hello: 'world' });

* getEnvironmentData,
* } = require('worker_threads');
* } = require('node:worker_threads');
*

@@ -684,3 +684,2 @@ * if (isMainThread) {

: typeof _BroadcastChannel;
/**

@@ -697,3 +696,2 @@ * `MessageChannel` class is a global reference for `require('worker_threads').MessageChannel`

: typeof _MessageChannel;
/**

@@ -704,3 +702,3 @@ * `MessagePort` class is a global reference for `require('worker_threads').MessagePort`

*/
var MessagePort: typeof globalThis extends {
var MessagePort: typeof globalThis extends {
onmessage: any;

@@ -707,0 +705,0 @@ MessagePort: infer T;

/**
* The `zlib` module provides compression functionality implemented using Gzip,
* Deflate/Inflate, and Brotli.
* The `node:zlib` module provides compression functionality implemented using
* Gzip, Deflate/Inflate, and Brotli.
*

@@ -8,3 +8,3 @@ * To access it:

* ```js
* const zlib = require('zlib');
* const zlib = require('node:zlib');
* ```

@@ -19,8 +19,8 @@ *

* ```js
* const { createGzip } = require('zlib');
* const { pipeline } = require('stream');
* const { createGzip } = require('node:zlib');
* const { pipeline } = require('node:stream');
* const {
* createReadStream,
* createWriteStream
* } = require('fs');
* createWriteStream,
* } = require('node:fs');
*

@@ -40,3 +40,3 @@ * const gzip = createGzip();

*
* const { promisify } = require('util');
* const { promisify } = require('node:util');
* const pipe = promisify(pipeline);

@@ -61,3 +61,3 @@ *

* ```js
* const { deflate, unzip } = require('zlib');
* const { deflate, unzip } = require('node:zlib');
*

@@ -84,3 +84,3 @@ * const input = '.................................';

*
* const { promisify } = require('util');
* const { promisify } = require('node:util');
* const do_unzip = promisify(unzip);

@@ -96,3 +96,3 @@ *

* @since v0.5.8
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/zlib.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/zlib.js)
*/

@@ -99,0 +99,0 @@ declare module 'zlib' {

/**
* The `tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes.
* In most cases, it will not be necessary or possible to use this module directly.
* However, it can be accessed using:
* The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream`classes. In most cases, it will not be necessary or possible to use this module
* directly. However, it can be accessed using:
*
* ```js
* const tty = require('tty');
* const tty = require('node:tty');
* ```

@@ -25,3 +24,3 @@ *

* manually create instances of the `tty.ReadStream` and `tty.WriteStream`classes.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/tty.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/tty.js)
*/

@@ -28,0 +27,0 @@ declare module 'tty' {

/**
* The `url` module provides utilities for URL resolution and parsing. It can be
* accessed using:
* The `node:url` module provides utilities for URL resolution and parsing. It can
* be accessed using:
*
* ```js
* import url from 'url';
* import url from 'node:url';
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/url.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/url.js)
*/

@@ -57,13 +57,7 @@ declare module 'url' {

*
* Use of the legacy `url.parse()` method is discouraged. Users should
* use the WHATWG `URL` API. Because the `url.parse()` method uses a
* lenient, non-standard algorithm for parsing URL strings, security
* issues can be introduced. Specifically, issues with [host name spoofing](https://hackerone.com/reports/678487) and
* incorrect handling of usernames and passwords have been identified.
*
* Deprecation of this API has been shelved for now primarily due to the the
* inability of the [WHATWG API to parse relative URLs](https://github.com/nodejs/node/issues/12682#issuecomment-1154492373).
* [Discussions are ongoing](https://github.com/whatwg/url/issues/531) for the best way to resolve this.
*
* `url.parse()` uses a lenient, non-standard algorithm for parsing URL
* strings. It is prone to security issues such as [host name spoofing](https://hackerone.com/reports/678487) and incorrect handling of usernames and passwords. Do not use with untrusted
* input. CVEs are not issued for `url.parse()` vulnerabilities. Use the `WHATWG URL` API instead.
* @since v0.1.25
* @deprecated Use the WHATWG URL API instead.
* @param urlString The URL string to parse.

@@ -83,3 +77,3 @@ * @param [parseQueryString=false] If `true`, the `query` property will always be set to an object returned by the {@link querystring} module's `parse()` method. If `false`, the `query` property

* ```js
* const url = require('url');
* const url = require('node:url');
* url.format({

@@ -91,4 +85,4 @@ * protocol: 'https',

* page: 1,
* format: 'json'
* }
* format: 'json',
* },
* });

@@ -214,3 +208,3 @@ *

* ```js
* const url = require('url');
* const url = require('node:url');
* url.resolve('/one/two/three', 'four'); // '/one/two/four'

@@ -250,6 +244,4 @@ * url.resolve('http://example.com/', '/one'); // 'http://example.com/one'

*
* This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged.
*
* ```js
* import url from 'url';
* import url from 'node:url';
*

@@ -272,6 +264,4 @@ * console.log(url.domainToASCII('español.com'));

*
* This feature is only available if the `node` executable was compiled with `ICU` enabled. If not, the domain names are passed through unchanged.
*
* ```js
* import url from 'url';
* import url from 'node:url';
*

@@ -293,3 +283,3 @@ * console.log(url.domainToUnicode('xn--espaol-zwa.com'));

* ```js
* import { fileURLToPath } from 'url';
* import { fileURLToPath } from 'node:url';
*

@@ -320,3 +310,3 @@ * const __filename = fileURLToPath(import.meta.url);

* ```js
* import { pathToFileURL } from 'url';
* import { pathToFileURL } from 'node:url';
*

@@ -339,3 +329,3 @@ * new URL('/foo#1', 'file:'); // Incorrect: file:///foo#1

* ```js
* import { urlToHttpOptions } from 'url';
* import { urlToHttpOptions } from 'node:url';
* const myURL = new URL('https://a:b@測試?abc#foo');

@@ -388,3 +378,3 @@ *

* resolveObjectURL,
* } = require('buffer');
* } = require('node:buffer');
*

@@ -411,3 +401,3 @@ * const blob = new Blob(['hello']);

* Removes the stored `Blob` identified by the given ID. Attempting to revoke a
* ID that isn’t registered will silently fail.
* ID that isn't registered will silently fail.
* @since v16.7.0

@@ -463,3 +453,3 @@ * @experimental

* // Setting the hostname does not change the port
* myURL.hostname = 'example.com:82';
* myURL.hostname = 'example.com';
* console.log(myURL.href);

@@ -527,3 +517,3 @@ * // Prints https://example.com:81/foo

* console.log(myURL.href);
* // Prints https://abc:123@example.com
* // Prints https://abc:123@example.com/
* ```

@@ -672,10 +662,10 @@ *

* ```js
* const myUrl = new URL('https://example.org/abc?foo=~bar');
* const myURL = new URL('https://example.org/abc?foo=~bar');
*
* console.log(myUrl.search); // prints ?foo=~bar
* console.log(myURL.search); // prints ?foo=~bar
*
* // Modify the URL via searchParams...
* myUrl.searchParams.sort();
* myURL.searchParams.sort();
*
* console.log(myUrl.search); // prints ?foo=%7Ebar
* console.log(myURL.search); // prints ?foo=%7Ebar
* ```

@@ -852,3 +842,3 @@ */

* The total number of parameter entries.
* @since v18.16.0
* @since v19.8.0
*/

@@ -855,0 +845,0 @@ readonly size: number;

/**
* The `v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
* The `node:v8` module exposes APIs that are specific to the version of [V8](https://developers.google.com/v8/) built into the Node.js binary. It can be accessed using:
*
* ```js
* const v8 = require('v8');
* const v8 = require('node:v8');
* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/v8.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/v8.js)
*/

@@ -32,2 +32,5 @@ declare module 'v8' {

number_of_detached_contexts: number;
total_global_handles_size: number;
used_global_handles_size: number;
external_memory: number;
}

@@ -72,2 +75,11 @@ interface HeapCodeStatistics {

*
* `total_global_handles_size` The value of total\_global\_handles\_size is the
* total memory size of V8 global handles.
*
* `used_global_handles_size` The value of used\_global\_handles\_size is the
* used memory size of V8 global handles.
*
* `external_memory` The value of external\_memory is the memory size of array
* buffers and external strings.
*
* ```js

@@ -85,3 +97,6 @@ * {

* number_of_native_contexts: 1,
* number_of_detached_contexts: 0
* number_of_detached_contexts: 0,
* total_global_handles_size: 8192,
* used_global_handles_size: 3296,
* external_memory: 318824
* }

@@ -155,3 +170,3 @@ * ```

* // Print GC events to stdout for one minute.
* const v8 = require('v8');
* const v8 = require('node:v8');
* v8.setFlagsFromString('--trace_gc');

@@ -179,3 +194,3 @@ * setTimeout(() => { v8.setFlagsFromString('--notrace_gc'); }, 60e3);

* // Print heap snapshot to the console
* const v8 = require('v8');
* const v8 = require('node:v8');
* const stream = v8.getHeapSnapshot();

@@ -185,3 +200,3 @@ * stream.pipe(process.stdout);

* @since v11.13.0
* @return A Readable Stream containing the V8 heap snapshot
* @return A Readable containing the V8 heap snapshot.
*/

@@ -206,8 +221,8 @@ function getHeapSnapshot(): Readable;

* ```js
* const { writeHeapSnapshot } = require('v8');
* const { writeHeapSnapshot } = require('node:v8');
* const {
* Worker,
* isMainThread,
* parentPort
* } = require('worker_threads');
* parentPort,
* } = require('node:worker_threads');
*

@@ -243,3 +258,5 @@ * if (isMainThread) {

/**
* Returns an object with the following properties:
* Get statistics about code and its metadata in the heap, see
* V8[`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the
* following properties:
*

@@ -250,3 +267,4 @@ * ```js

* bytecode_and_metadata_size: 161368,
* external_script_source_size: 1410794
* external_script_source_size: 1410794,
* cpu_profiler_metadata_size: 0,
* }

@@ -301,3 +319,3 @@ * ```

/**
* Write raw bytes into the serializer’s internal buffer. The deserializer
* Write raw bytes into the serializer's internal buffer. The deserializer
* will require a way to compute the length of the buffer.

@@ -358,3 +376,3 @@ * For use inside of a custom `serializer._writeHostObject()`.

/**
* Read raw bytes from the deserializer’s internal buffer. The `length` parameter
* Read raw bytes from the deserializer's internal buffer. The `length` parameter
* must correspond to the length of the buffer that was passed to `serializer.writeRawBytes()`.

@@ -404,5 +422,5 @@ * For use inside of a custom `deserializer._readHostObject()`.

function stopCoverage(): void;
/**
* This API collects GC data in current thread.
* @since v19.6.0, v18.15.0
*/

@@ -412,6 +430,82 @@ class GCProfiler {

* Start collecting GC data.
* @since v19.6.0, v18.15.0
*/
start(): void;
/**
* Stop collecting GC data and return a object.
* Stop collecting GC data and return an object.The content of object
* is as follows.
*
* ```json
* {
* "version": 1,
* "startTime": 1674059033862,
* "statistics": [
* {
* "gcType": "Scavenge",
* "beforeGC": {
* "heapStatistics": {
* "totalHeapSize": 5005312,
* "totalHeapSizeExecutable": 524288,
* "totalPhysicalSize": 5226496,
* "totalAvailableSize": 4341325216,
* "totalGlobalHandlesSize": 8192,
* "usedGlobalHandlesSize": 2112,
* "usedHeapSize": 4883840,
* "heapSizeLimit": 4345298944,
* "mallocedMemory": 254128,
* "externalMemory": 225138,
* "peakMallocedMemory": 181760
* },
* "heapSpaceStatistics": [
* {
* "spaceName": "read_only_space",
* "spaceSize": 0,
* "spaceUsedSize": 0,
* "spaceAvailableSize": 0,
* "physicalSpaceSize": 0
* }
* ]
* },
* "cost": 1574.14,
* "afterGC": {
* "heapStatistics": {
* "totalHeapSize": 6053888,
* "totalHeapSizeExecutable": 524288,
* "totalPhysicalSize": 5500928,
* "totalAvailableSize": 4341101384,
* "totalGlobalHandlesSize": 8192,
* "usedGlobalHandlesSize": 2112,
* "usedHeapSize": 4059096,
* "heapSizeLimit": 4345298944,
* "mallocedMemory": 254128,
* "externalMemory": 225138,
* "peakMallocedMemory": 181760
* },
* "heapSpaceStatistics": [
* {
* "spaceName": "read_only_space",
* "spaceSize": 0,
* "spaceUsedSize": 0,
* "spaceAvailableSize": 0,
* "physicalSpaceSize": 0
* }
* ]
* }
* }
* ],
* "endTime": 1674059036865
* }
* ```
*
* Here's an example.
*
* ```js
* const { GCProfiler } = require('v8');
* const profiler = new GCProfiler();
* profiler.start();
* setTimeout(() => {
* console.log(profiler.stop());
* }, 1000);
* ```
* @since v19.6.0, v18.15.0
*/

@@ -418,0 +512,0 @@ stop(): GCProfilerResult;

/**
* The `vm` module enables compiling and running code within V8 Virtual
* The `node:vm` module enables compiling and running code within V8 Virtual
* Machine contexts.
*
* **The `vm` module is not a security**
* **The `node:vm` module is not a security**
* **mechanism. Do not use it to run untrusted code.**

@@ -20,3 +20,3 @@ *

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*

@@ -38,3 +38,3 @@ * const x = 1;

* ```
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/vm.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/vm.js)
*/

@@ -203,7 +203,7 @@ declare module 'vm' {

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*
* const context = {
* animal: 'cat',
* count: 2
* count: 2,
* };

@@ -240,3 +240,3 @@ *

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*

@@ -266,3 +266,3 @@ * const script = new vm.Script('globalVar = "set"');

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*

@@ -289,2 +289,12 @@ * global.globalVar = 0;

*
* The code cache of the `Script` doesn't contain any JavaScript observable
* states. The code cache is safe to be saved along side the script source and
* used to construct new `Script` instances multiple times.
*
* Functions in the `Script` source can be marked as lazily compiled and they are
* not compiled at construction of the `Script`. These functions are going to be
* compiled when they are invoked the first time. The code cache serializes the
* metadata that V8 currently knows about the `Script` that it can use to speed up
* future compilations.
*
* ```js

@@ -299,7 +309,10 @@ * const script = new vm.Script(`

*
* const cacheWithoutX = script.createCachedData();
* const cacheWithoutAdd = script.createCachedData();
* // In `cacheWithoutAdd` the function `add()` is marked for full compilation
* // upon invocation.
*
* script.runInThisContext();
*
* const cacheWithX = script.createCachedData();
* const cacheWithAdd = script.createCachedData();
* // `cacheWithAdd` contains fully compiled function `add()`.
* ```

@@ -311,6 +324,26 @@ * @since v10.6.0

cachedDataProduced?: boolean | undefined;
/**
* When `cachedData` is supplied to create the `vm.Script`, this value will be set
* to either `true` or `false` depending on acceptance of the data by V8\.
* Otherwise the value is `undefined`.
* @since v5.7.0
*/
cachedDataRejected?: boolean | undefined;
cachedData?: Buffer | undefined;
/**
* When the script is compiled from a source that contains a source map magic comment, this property will be set to the URL of the source map.
* When the script is compiled from a source that contains a source map magic
* comment, this property will be set to the URL of the source map.
*
* ```js
* import vm from 'node:vm';
*
* const script = new vm.Script(`
* function myFunc() {}
* //# sourceMappingURL=sourcemap.json
* `);
*
* console.log(script.sourceMapURL);
* // Prints: sourcemap.json
* ```
* @since v19.1.0, v18.13.0
*/

@@ -327,3 +360,3 @@ sourceMapURL?: string | undefined;

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*

@@ -375,3 +408,3 @@ * global.globalVar = 3;

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*

@@ -405,7 +438,7 @@ * const contextObject = { globalVar: 1 };

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
*
* const contextObject = {
* animal: 'cat',
* count: 2
* count: 2,
* };

@@ -434,3 +467,3 @@ *

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
* let localVar = 'initial value';

@@ -456,13 +489,13 @@ *

*
* In order to run a simple web server using the `http` module the code passed to
* the context must either call `require('http')` on its own, or have a reference
* to the `http` module passed to it. For instance:
* In order to run a simple web server using the `node:http` module the code passed
* to the context must either call `require('node:http')` on its own, or have a
* reference to the `node:http` module passed to it. For instance:
*
* ```js
* 'use strict';
* const vm = require('vm');
* const vm = require('node:vm');
*
* const code = `
* ((require) => {
* const http = require('http');
* const http = require('node:http');
*

@@ -496,3 +529,7 @@ * http.createServer((request, response) => {

*/
function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function & {
function compileFunction(
code: string,
params?: ReadonlyArray<string>,
options?: CompileFunctionOptions
): Function & {
cachedData?: Script['cachedData'] | undefined;

@@ -515,3 +552,3 @@ cachedDataProduced?: Script['cachedDataProduced'] | undefined;

* ```js
* const vm = require('vm');
* const vm = require('node:vm');
* // Measure the memory used by the main context.

@@ -559,3 +596,2 @@ * vm.measureMemory({ mode: 'summary' })

function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>;
interface ModuleEvaluateOptions {

@@ -565,12 +601,124 @@ timeout?: RunningScriptOptions['timeout'] | undefined;

}
type ModuleLinker = (specifier: string, referencingModule: Module, extra: { assert: Object }) => Module | Promise<Module>;
type ModuleLinker = (
specifier: string,
referencingModule: Module,
extra: {
assert: Object;
}
) => Module | Promise<Module>;
type ModuleStatus = 'unlinked' | 'linking' | 'linked' | 'evaluating' | 'evaluated' | 'errored';
/**
* This feature is only available with the `--experimental-vm-modules` command
* flag enabled.
*
* The `vm.Module` class provides a low-level interface for using
* ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`class that closely mirrors [Module Record](https://www.ecma-international.org/ecma-262/#sec-abstract-module-records)
* s as defined in the ECMAScript
* specification.
*
* Unlike `vm.Script` however, every `vm.Module` object is bound to a context from
* its creation. Operations on `vm.Module` objects are intrinsically asynchronous,
* in contrast with the synchronous nature of `vm.Script` objects. The use of
* 'async' functions can help with manipulating `vm.Module` objects.
*
* Using a `vm.Module` object requires three distinct steps: creation/parsing,
* linking, and evaluation. These three steps are illustrated in the following
* example.
*
* This implementation lies at a lower level than the `ECMAScript Module
* loader`. There is also no way to interact with the Loader yet, though
* support is planned.
*
* ```js
* import vm from 'node:vm';
*
* const contextifiedObject = vm.createContext({
* secret: 42,
* print: console.log,
* });
*
* // Step 1
* //
* // Create a Module by constructing a new `vm.SourceTextModule` object. This
* // parses the provided source text, throwing a `SyntaxError` if anything goes
* // wrong. By default, a Module is created in the top context. But here, we
* // specify `contextifiedObject` as the context this Module belongs to.
* //
* // Here, we attempt to obtain the default export from the module "foo", and
* // put it into local binding "secret".
*
* const bar = new vm.SourceTextModule(`
* import s from 'foo';
* s;
* print(s);
* `, { context: contextifiedObject });
*
* // Step 2
* //
* // "Link" the imported dependencies of this Module to it.
* //
* // The provided linking callback (the "linker") accepts two arguments: the
* // parent module (`bar` in this case) and the string that is the specifier of
* // the imported module. The callback is expected to return a Module that
* // corresponds to the provided specifier, with certain requirements documented
* // in `module.link()`.
* //
* // If linking has not started for the returned Module, the same linker
* // callback will be called on the returned Module.
* //
* // Even top-level Modules without dependencies must be explicitly linked. The
* // callback provided would never be called, however.
* //
* // The link() method returns a Promise that will be resolved when all the
* // Promises returned by the linker resolve.
* //
* // Note: This is a contrived example in that the linker function creates a new
* // "foo" module every time it is called. In a full-fledged module system, a
* // cache would probably be used to avoid duplicated modules.
*
* async function linker(specifier, referencingModule) {
* if (specifier === 'foo') {
* return new vm.SourceTextModule(`
* // The "secret" variable refers to the global variable we added to
* // "contextifiedObject" when creating the context.
* export default secret;
* `, { context: referencingModule.context });
*
* // Using `contextifiedObject` instead of `referencingModule.context`
* // here would work as well.
* }
* throw new Error(`Unable to resolve dependency: ${specifier}`);
* }
* await bar.link(linker);
*
* // Step 3
* //
* // Evaluate the Module. The evaluate() method returns a promise which will
* // resolve after the module has finished evaluating.
*
* // Prints 42.
* await bar.evaluate();
* ```
* @since v13.0.0, v12.16.0
* @experimental
*/
class Module {
/**
* The specifiers of all dependencies of this module.
* The specifiers of all dependencies of this module. The returned array is frozen
* to disallow any changes to it.
*
* Corresponds to the `[[RequestedModules]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
* the ECMAScript specification.
*/
dependencySpecifiers: readonly string[];
/**
* If the `module.status` is `'errored'`, this property contains the exception thrown by the module during evaluation.
* If the status is anything else, accessing this property will result in a thrown exception.
* If the `module.status` is `'errored'`, this property contains the exception
* thrown by the module during evaluation. If the status is anything else,
* accessing this property will result in a thrown exception.
*
* The value `undefined` cannot be used for cases where there is not a thrown
* exception due to possible ambiguity with `throw undefined;`.
*
* Corresponds to the `[[EvaluationError]]` field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s
* in the ECMAScript specification.
*/

@@ -584,7 +732,25 @@ error: any;

/**
* The namespace object of the module. This is only available after linking (`module.link()`) has completed.
* The namespace object of the module. This is only available after linking
* (`module.link()`) has completed.
*
* Corresponds to the [GetModuleNamespace](https://tc39.es/ecma262/#sec-getmodulenamespace) abstract operation in the ECMAScript
* specification.
*/
namespace: Object;
/**
* The current status of the module.
* The current status of the module. Will be one of:
*
* * `'unlinked'`: `module.link()` has not yet been called.
* * `'linking'`: `module.link()` has been called, but not all Promises returned
* by the linker function have been resolved yet.
* * `'linked'`: The module has been linked successfully, and all of its
* dependencies are linked, but `module.evaluate()` has not yet been called.
* * `'evaluating'`: The module is being evaluated through a `module.evaluate()` on
* itself or a parent module.
* * `'evaluated'`: The module has been successfully evaluated.
* * `'errored'`: The module has been evaluated, but an exception was thrown.
*
* Other than `'errored'`, this status string corresponds to the specification's [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records)'s `[[Status]]` field. `'errored'`
* corresponds to`'evaluated'` in the specification, but with `[[EvaluationError]]` set to a
* value that is not `undefined`.
*/

@@ -595,16 +761,50 @@ status: ModuleStatus;

*
* This must be called after the module has been linked; otherwise it will reject
* It could be called also when the module has already been evaluated, in which case it will either do nothing
* if the initial evaluation ended in success (`module.status` is `'evaluated'`) or it will re-throw the exception
* that the initial evaluation resulted in (`module.status` is `'errored'`).
* This must be called after the module has been linked; otherwise it will reject.
* It could be called also when the module has already been evaluated, in which
* case it will either do nothing if the initial evaluation ended in success
* (`module.status` is `'evaluated'`) or it will re-throw the exception that the
* initial evaluation resulted in (`module.status` is `'errored'`).
*
* This method cannot be called while the module is being evaluated (`module.status` is `'evaluating'`).
* This method cannot be called while the module is being evaluated
* (`module.status` is `'evaluating'`).
*
* Corresponds to the [Evaluate() concrete method](https://tc39.es/ecma262/#sec-moduleevaluation) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in the
* ECMAScript specification.
* @return Fulfills with `undefined` upon success.
*/
evaluate(options?: ModuleEvaluateOptions): Promise<void>;
/**
* Link module dependencies. This method must be called before evaluation, and can only be called once per module.
* Link module dependencies. This method must be called before evaluation, and
* can only be called once per module.
*
* The function is expected to return a `Module` object or a `Promise` that
* eventually resolves to a `Module` object. The returned `Module` must satisfy the
* following two invariants:
*
* * It must belong to the same context as the parent `Module`.
* * Its `status` must not be `'errored'`.
*
* If the returned `Module`'s `status` is `'unlinked'`, this method will be
* recursively called on the returned `Module` with the same provided `linker`function.
*
* `link()` returns a `Promise` that will either get resolved when all linking
* instances resolve to a valid `Module`, or rejected if the linker function either
* throws an exception or returns an invalid `Module`.
*
* The linker function roughly corresponds to the implementation-defined [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) abstract operation in the
* ECMAScript
* specification, with a few key differences:
*
* * The linker function is allowed to be asynchronous while [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) is synchronous.
*
* The actual [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) implementation used during module
* linking is one that returns the modules linked during linking. Since at
* that point all modules would have been fully linked already, the [HostResolveImportedModule](https://tc39.es/ecma262/#sec-hostresolveimportedmodule) implementation is fully synchronous per
* specification.
*
* Corresponds to the [Link() concrete method](https://tc39.es/ecma262/#sec-moduledeclarationlinking) field of [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records) s in
* the ECMAScript specification.
*/
link(linker: ModuleLinker): Promise<void>;
}
interface SourceTextModuleOptions {

@@ -626,2 +826,13 @@ /**

}
/**
* This feature is only available with the `--experimental-vm-modules` command
* flag enabled.
*
*
*
* The `vm.SourceTextModule` class provides the [Source Text Module Record](https://tc39.es/ecma262/#sec-source-text-module-records) as
* defined in the ECMAScript specification.
* @since v9.6.0
* @experimental
*/
class SourceTextModule extends Module {

@@ -634,3 +845,2 @@ /**

}
interface SyntheticModuleOptions {

@@ -647,2 +857,27 @@ /**

}
/**
* This feature is only available with the `--experimental-vm-modules` command
* flag enabled.
*
*
*
* The `vm.SyntheticModule` class provides the [Synthetic Module Record](https://heycam.github.io/webidl/#synthetic-module-records) as
* defined in the WebIDL specification. The purpose of synthetic modules is to
* provide a generic interface for exposing non-JavaScript sources to ECMAScript
* module graphs.
*
* ```js
* const vm = require('node:vm');
*
* const source = '{ "a": 1 }';
* const module = new vm.SyntheticModule(['default'], function() {
* const obj = JSON.parse(source);
* this.setExport('default', obj);
* });
*
* // Use `module` in linking...
* ```
* @since v13.0.0, v12.16.0
* @experimental
*/
class SyntheticModule extends Module {

@@ -656,6 +891,21 @@ /**

/**
* This method is used after the module is linked to set the values of exports.
* If it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error will be thrown.
* @param name
* @param value
* This method is used after the module is linked to set the values of exports. If
* it is called before the module is linked, an `ERR_VM_MODULE_STATUS` error
* will be thrown.
*
* ```js
* import vm from 'node:vm';
*
* const m = new vm.SyntheticModule(['x'], () => {
* m.setExport('x', 1);
* });
*
* await m.link(() => {});
* await m.evaluate();
*
* assert.strictEqual(m.namespace.x, 1);
* ```
* @since v13.0.0, v12.16.0
* @param name Name of the export to set.
* @param value The value to set the export to.
*/

@@ -662,0 +912,0 @@ setExport(name: string, value: any): void;

@@ -6,22 +6,19 @@ /**

* ```js
* import { readFile } from 'fs/promises';
* import { readFile } from 'node:fs/promises';
* import { WASI } from 'wasi';
* import { argv, env } from 'process';
* import { argv, env } from 'node:process';
*
* const wasi = new WASI({
* version: 'preview1',
* args: argv,
* env,
* preopens: {
* '/sandbox': '/some/real/path/that/wasm/can/access'
* }
* '/sandbox': '/some/real/path/that/wasm/can/access',
* },
* });
*
* // Some WASI binaries require:
* // const importObject = { wasi_unstable: wasi.wasiImport };
* const importObject = { wasi_snapshot_preview1: wasi.wasiImport };
*
* const wasm = await WebAssembly.compile(
* await readFile(new URL('./demo.wasm', import.meta.url))
* await readFile(new URL('./demo.wasm', import.meta.url)),
* );
* const instance = await WebAssembly.instantiate(wasm, importObject);
* const instance = await WebAssembly.instantiate(wasm, wasi.getImportObject());
*

@@ -68,7 +65,4 @@ * wasi.start(instance);

* ```
*
* The `--experimental-wasi-unstable-preview1` CLI argument is needed for this
* example to run.
* @experimental
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/wasi.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/wasi.js)
*/

@@ -75,0 +69,0 @@ declare module 'wasi' {

/**
* The `worker_threads` module enables the use of threads that execute JavaScript
* in parallel. To access it:
* The `node:worker_threads` module enables the use of threads that execute
* JavaScript in parallel. To access it:
*
* ```js
* const worker = require('worker_threads');
* const worker = require('node:worker_threads');
* ```

@@ -18,4 +18,4 @@ *

* const {
* Worker, isMainThread, parentPort, workerData
* } = require('worker_threads');
* Worker, isMainThread, parentPort, workerData,
* } = require('node:worker_threads');
*

@@ -26,3 +26,3 @@ * if (isMainThread) {

* const worker = new Worker(__filename, {
* workerData: script
* workerData: script,
* });

@@ -54,3 +54,3 @@ * worker.on('message', resolve);

* specifically `argv` and `execArgv` options.
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/worker_threads.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/worker_threads.js)
*/

@@ -78,3 +78,3 @@ declare module 'worker_threads' {

* ```js
* const { MessageChannel } = require('worker_threads');
* const { MessageChannel } = require('node:worker_threads');
*

@@ -128,3 +128,3 @@ * const { port1, port2 } = new MessageChannel();

* ```js
* const { MessageChannel } = require('worker_threads');
* const { MessageChannel } = require('node:worker_threads');
* const { port1, port2 } = new MessageChannel();

@@ -140,3 +140,3 @@ *

*
* `transferList` may be a list of [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), `MessagePort` and `FileHandle` objects.
* `transferList` may be a list of [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), `MessagePort`, and `FileHandle` objects.
* After transferring, they are not usable on the sending side of the channel

@@ -152,3 +152,3 @@ * anymore (even if they are not contained in `value`). Unlike with `child processes`, transferring handles such as network sockets is currently

* ```js
* const { MessageChannel } = require('worker_threads');
* const { MessageChannel } = require('node:worker_threads');
* const { port1, port2 } = new MessageChannel();

@@ -180,3 +180,3 @@ *

* For more information on the serialization and deserialization mechanisms
* behind this API, see the `serialization API of the v8 module`.
* behind this API, see the `serialization API of the node:v8 module`.
* @since v10.5.0

@@ -305,5 +305,5 @@ */

*
* * The `process.stdin`, `process.stdout` and `process.stderr` may be redirected by the parent thread.
* * The `require('worker_threads').isMainThread` property is set to `false`.
* * The `require('worker_threads').parentPort` message port is available.
* * The `process.stdin`, `process.stdout`, and `process.stderr` streams may be redirected by the parent thread.
* * The `require('node:worker_threads').isMainThread` property is set to `false`.
* * The `require('node:worker_threads').parentPort` message port is available.
* * `process.exit()` does not stop the whole program, just the single thread,

@@ -325,7 +325,7 @@ * and `process.abort()` is not available.

*
* Like [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) and the `cluster module`, two-way communication can be
* achieved through inter-thread message passing. Internally, a `Worker` has a
* built-in pair of `MessagePort` s that are already associated with each other
* when the `Worker` is created. While the `MessagePort` object on the parent side
* is not directly exposed, its functionalities are exposed through `worker.postMessage()` and the `worker.on('message')` event
* Like [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) and the `node:cluster module`, two-way communication
* can be achieved through inter-thread message passing. Internally, a `Worker` has
* a built-in pair of `MessagePort` s that are already associated with each
* other when the `Worker` is created. While the `MessagePort` object on the parent
* side is not directly exposed, its functionalities are exposed through `worker.postMessage()` and the `worker.on('message')` event
* on the `Worker` object for the parent thread.

@@ -343,6 +343,6 @@ *

* ```js
* const assert = require('assert');
* const assert = require('node:assert');
* const {
* Worker, MessageChannel, MessagePort, isMainThread, parentPort
* } = require('worker_threads');
* Worker, MessageChannel, MessagePort, isMainThread, parentPort,
* } = require('node:worker_threads');
* if (isMainThread) {

@@ -387,3 +387,3 @@ * const worker = new Worker(__filename);

* An integer identifier for the referenced thread. Inside the worker thread,
* it is available as `require('worker_threads').threadId`.
* it is available as `require('node:worker_threads').threadId`.
* This value is unique for each `Worker` instance inside a single process.

@@ -415,3 +415,3 @@ * @since v10.5.0

/**
* Send a message to the worker that is received via `require('worker_threads').parentPort.on('message')`.
* Send a message to the worker that is received via `require('node:worker_threads').parentPort.on('message')`.
* See `port.postMessage()` for more details.

@@ -510,4 +510,4 @@ * @since v10.5.0

* BroadcastChannel,
* Worker
* } = require('worker_threads');
* Worker,
* } = require('node:worker_threads');
*

@@ -566,3 +566,3 @@ * const bc = new BroadcastChannel('hello');

* ```js
* const { MessageChannel, markAsUntransferable } = require('worker_threads');
* const { MessageChannel, markAsUntransferable } = require('node:worker_threads');
*

@@ -609,6 +609,6 @@ * const pooledBuffer = new ArrayBuffer(8);

* Receive a single message from a given `MessagePort`. If no message is available,`undefined` is returned, otherwise an object with a single `message` property
* that contains the message payload, corresponding to the oldest message in the`MessagePort`’s queue.
* that contains the message payload, corresponding to the oldest message in the`MessagePort`'s queue.
*
* ```js
* const { MessageChannel, receiveMessageOnPort } = require('worker_threads');
* const { MessageChannel, receiveMessageOnPort } = require('node:worker_threads');
* const { port1, port2 } = new MessageChannel();

@@ -644,3 +644,3 @@ * port1.postMessage({ hello: 'world' });

* getEnvironmentData,
* } = require('worker_threads');
* } = require('node:worker_threads');
*

@@ -684,3 +684,2 @@ * if (isMainThread) {

: typeof _BroadcastChannel;
/**

@@ -697,3 +696,2 @@ * `MessageChannel` class is a global reference for `require('worker_threads').MessageChannel`

: typeof _MessageChannel;
/**

@@ -704,3 +702,3 @@ * `MessagePort` class is a global reference for `require('worker_threads').MessagePort`

*/
var MessagePort: typeof globalThis extends {
var MessagePort: typeof globalThis extends {
onmessage: any;

@@ -707,0 +705,0 @@ MessagePort: infer T;

/**
* The `zlib` module provides compression functionality implemented using Gzip,
* Deflate/Inflate, and Brotli.
* The `node:zlib` module provides compression functionality implemented using
* Gzip, Deflate/Inflate, and Brotli.
*

@@ -8,3 +8,3 @@ * To access it:

* ```js
* const zlib = require('zlib');
* const zlib = require('node:zlib');
* ```

@@ -19,8 +19,8 @@ *

* ```js
* const { createGzip } = require('zlib');
* const { pipeline } = require('stream');
* const { createGzip } = require('node:zlib');
* const { pipeline } = require('node:stream');
* const {
* createReadStream,
* createWriteStream
* } = require('fs');
* createWriteStream,
* } = require('node:fs');
*

@@ -40,3 +40,3 @@ * const gzip = createGzip();

*
* const { promisify } = require('util');
* const { promisify } = require('node:util');
* const pipe = promisify(pipeline);

@@ -61,3 +61,3 @@ *

* ```js
* const { deflate, unzip } = require('zlib');
* const { deflate, unzip } = require('node:zlib');
*

@@ -84,3 +84,3 @@ * const input = '.................................';

*
* const { promisify } = require('util');
* const { promisify } = require('node:util');
* const do_unzip = promisify(unzip);

@@ -96,3 +96,3 @@ *

* @since v0.5.8
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/zlib.js)
* @see [source](https://github.com/nodejs/node/blob/v20.0.0/lib/zlib.js)
*/

@@ -99,0 +99,0 @@ declare module 'zlib' {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc